Using the class \Airaghi\Tools\Container it’s possibile to share between your scripts (inside a single execution flow) values and objects reference without having to use global variables. The class has methods for: – saving and getting values – saving and getting objects references – deleting of values stored – deleting of stored references The code is available here.
Author Archives: Davide Airaghi
PhalconPHP: alternative way to use Oracle11g
Develpoing a new website based on PhalconPHP i tried to use Oracle11g as database, but in the process i had some problem. Searching the web for solutions i read about some problem with the native Oracle PDO driver, so i tried “pdo-via-oci8” by Arjay Angeles . As done for MSSQL i tried to create an new Adapter and a new Dialect to let me use pdo-via-oci8 inside my PhalconPHP-based application. What …
Continue reading “PhalconPHP: alternative way to use Oracle11g”
Linux: SQL Server connection
Do you need tools and libraries to use MSQ SQL Server from your Linux box ? Have you tried using UnixODBC and FreeDTS ? Let’s see how to do this if you choose to compile and build those libraries.
Force using gtk3 when building software in systems with both gtk2 and gtk3
Do you have both gtk2 che gtk3 installed on your Slackware box and sometimes gtk3 based programs compilation fails because the building script can’t find the right version of the library? If the answer to the question is “Yes” maybe you can find a solution to your problem using the following trick.
PhalconPHP 2.0.x : SQL Server Connector
Starting from the release of PhalconPHP 2.0 the old connector i wrote to allow me to use SQL Server stopped working. To let me use new versions of PhalconPHP i updated the old classes (both Adapter and Dialect). You can download them here .
Cookies and Privacy
This website makes use of technical and anonymized analytical cookies, for more info read the full Privacy and Cookies Policy.
Linux: read files created on OsX using Pages
Do you need to open and read on your Linux box files generated on Mac OsX using Pages? Below how i’m doing it. create file /usr/local/bin/pages edit /usr/local/bin/pages and inserte the following code
1 2 3 4 5 6 7 8 9 10 11 |
#!/bin/sh PDFV=evince # your favorite pdf viewer FILEP="$1" FILET=$(mktemp) mv $FILET ${FILET}.pdf DIRP=$(dirname $FILEP) cd $DIRP unzip -jp "$1" QuickLook/Preview.pdf > ${FILET}.pdf $PDFV ${FILET}.pdf cd - rm -f ${FILET}.pdf |
at line 2 insert the full path of your favorite pdf viewer make executable the newly created file ( chmod +x …
Continue reading “Linux: read files created on OsX using Pages”
Slackware: CentOS linux container
If you need to create a CentOS based linux container on your Slackware here you can find how i’ve made it. Before you start (re)compile your kernel including every config option needed to have lxc-checkconfig output “enable” in each line. (re)compile your kernel to add support for “networking bridge” update rpm package using the one …
Dukto – Multiplatform AirDrop
If you are looking for a AirDrop multiplatform replacement you can give a chance to Dukto ! It offers: – multiplatform support (Windows, Linux, Mac OSX) – simple text quick exchange – simple clipboard contentquick exchange – simple filequick exchange (select you file or use drag&drop) – simple directoryquick exchange (select your directory or use drag&drop) The application can be used to …
Polkit extra actions: run useful graphical applications as root on Slackware
During my daily programming activities i have to run, as root, some applications, even if i am logged in as a normal user, which make use of a gui (most of the times based on gtk) and this can be a problem using pkexec program-name due to the default policy of Polkit that disable support …
Continue reading “Polkit extra actions: run useful graphical applications as root on Slackware”