Archive: page 11
15 Excellent Resources for PHP Extension Development
Whilst developing a PHP extension recently I spent quite a bit of time researching exactly how to create an extension, the best practices and the DocBook format of the PHP manual for documenting the extension. By the time I finished writing the extension I had found some very good resources both on the web and in print. Printed books: Sara Golemon’s Extending and Embedding PHP Advanced PHP Programming by George Schlossnagle Building Custom PHP Extensions by Blake Schwendiman Online articles and presentations: The Internals section of the PHP manual Kristina Chodorow’s PHP Extensions Made Eldrich on her blog in 2011: Installing PHP Hello, World! Read more ⇒
The PHP ssdeep Extension is Now in PECL
The PHP ssdeep Extension is Now in PECL This means you can now install it easily by simply running: sudo pecl install ssdeep There is also proper documentation in the PHP manual which can be found at php.net/ssdeep. For more information on the extension either see the PECL project page or the ssdeep PHP/PECL extension’s homepage. Read more ⇒
Per-tag RSS feeds for Tumblr from notes.husk.org
Per-tag RSS feeds for Tumblr from notes.husk.org I didn’t think that Tumblr offered per-tag RSS feeds, but after spending some time trying to hack the JSON output from the Tumblr API into my aggregated front page, I tried appending “/rss” to the URL of one of my tag archive pages, and somewhat to my surprise, it worked. Of course, RSS is… A nice Tumblr tip. Read more ⇒
php_ssdeep Fuzzy Hashing PHP Extension
php_ssdeep Fuzzy Hashing PHP Extension **Updated 16/9:**php_ssdeep is now in PECL so I have updated this post to reflect that. On a recent project I needed a fast way to compare documents for likeness and return a percentage match. With much research and one unanswered Stackoverflow post later I came across Jesse Kornblum’s ssdeep utility intended for computer forensics such as looking for signatures in files when hunting rootkits etc. All the technical details of fuzzy hashing are described in his 2006 journal article Identifying almost identical files using context triggered piecewise hashing. Read more ⇒
wombert: Expendables Body Count
wombert: Expendables Body Count - originally from termlifeinsurance.org/expendables-body-count Read more ⇒
A PHP wrapper for the unix at command
A project I am working on at the moment requires time delayed job queues and having found nothing yet that can manage it properly so I decided to wrap up `at` into a PHP class. This gives you simple methods to add, list and remove jobs from the `at` queue using object oriented code. The code is very simple and I have documented it reasonably well so along with the examples you should get on your way quickly. Read more ⇒
Batch remove extensions in Ubuntu
Batch remove extensions in Ubuntu Sometimes you will want to batch remove extensions from a load of files: for i in $(ls *.png); do mv $i ${i%.png}; done If you want to remove extensions from files with a .txt extension then you would replace the two instances of .png in the script above with .txt. You can take the extension off of all files using the following: for i in $(ls *. Read more ⇒
If you are having problems getting Ubuntu atd running
If you just cannot get atd to start running check the permissions on your /var/spool/cron/atjobs and /var/spool/cron/atspool directories. The should be `chmod 770` and then `chmod +t`. Also they should be owned by `daemon:daemon`. I was getting this error when attempting to set new at jobs: Can’t open /var/run/atd.pid to signal atd. No atd running? If I tried to start the daemon through the service management I was getting: sudo service atd start start: Job is already running: atd Read more ⇒
Getting gearman to install on Ubuntu
Getting gearman to install on Ubuntu Getting the gearman PHP PECL package to build on Ubuntu is problematic with many unaccounted for dependency issues. I only made a couple changes when following the instructions from JSJoy as I am running Karmic rather than Lucid I changed the apt-get sources to: deb http://ppa.launchpad.net/gearman-developers/ppa/ubuntu karmic main deb-src http://ppa.launchpad.net/gearman-developers/ppa/ubuntu karmic main My sources file was also located at /etc/apt/sources.list and not /etc/sources.list as stated in the original post from JSJoy. Read more ⇒
In this video, John Resig presents his 6 Secrets to becoming a j…