Thinking about evaluating Sublime Text.
Category Archives: Programming
Debugging PHPUnit Tests in NetBeans with XDebug
Today I read Debugging PHPUnit Tests in NetBeans with XDebug and got PHPUnit tests running in the NetBeans debugger.
AngularJS and CURL and pcntl_fork, oh my!
Reading about angularjs. And the curl library. And pcntl_fork.
Processing archives
I’m de-duplicating my archives. I processed 3.6 million files and then crashed:
Symlinks: 30,836 Directories: 513,860 Files: 3,665,000 Hardlinks: 2,241,681 Duplicates: 55,309
Time to start again. Duplicates that have already been processed will show up as unduplicated files on this next iteration… my script is here.
And now we’re finished:
Symlinks: 31,926 Directories: 2,071,219 Files: 11,682,777 Hardlinks: 8,034,685 Duplicates: 669,452 Rate: 3555.44 files/second
PHPUnit Skeleton Generator
Today I installed PHPUnit Skeleton Generator like this:
$ vim ~/.composer/composer.json Added: "minimum-stability": "dev" $ composer global require 'phpunit/phpunit-skeleton-generator=*'
But… then it turned out that the interface was broken when invoking from NetBeans, so over here:
$ pear channel-discover components.ez.no $ pear install phpunit/PHPUnit_SkeletonGenerator
Then I created a phpunit-skelgen.php file in my project and added:
#!/usr/bin/php <?php require_once '/usr/share/php/SebastianBergmann/PHPUnit/SkeletonGenerator/autoload.php'; require_once '/usr/share/php/SebastianBergmann/PHPUnit/SkeletonGenerator/Command.php'; SebastianBergmann\PHPUnit\SkeletonGenerator\Command::main();
Simple! :)
playframework
Watched a presentation on playframework today, interesting stuff!
Eclipse and XDebug NIGHTMARE
Welcome to my nightmare.
To see listeners:
# netstat -anp | grep LISTEN | less
# nmap localhost
To use IPv4 instead of IPv6 in Eclipse, edit:
/home/jj5/.eclipse/org.eclipse.platform_3.8_155965261/configuration/config.ini
And add:
# https://lists.debian.org/debian-java/2010/03/msg00073.html java.net.preferIPv4Stack=true
More to come…
MySQL Engines: MyISAM vs. InnoDB
On my TODO list: MySQL Engines: MyISAM vs. InnoDB.
The utf8mb4 Character Set (4-Byte UTF-8 Unicode Encoding)
Reading about The utf8mb4 Character Set (4-Byte UTF-8 Unicode Encoding).
PDO Persistent Connection in PHP left broken if connected to dropped database
So you use PDO and specify PDO::ATTR_PERSISTENT => true. Then you drop your database. Then you open a new persistent connection and bang! Not working. The trick is to not use persistent connections to databases that may be dropped. And probably an ‘apache2ctl graceful’ after you drop a database being used by Apache…