Compile PHP pcntl module on OS X Lion

Compile PHP pcntl module on OS X Lion

I had some trouble compiling pcntl PHP module on OS X Lion so I thought I’d share this solution. In fact, you can use these steps to compile any other PHP module. First download the latest php source from PHP.NET cd into your php src directory, then: cd ext/pcntl phpize ./configure --enable-pcntl When I ran […]

Read More

opendiff and FileMerge on OS X

opendiff and FileMerge on OS X

Today I discovered opendiff tool that’s native to OS X – provided you have installed the Xcode on your system. It allows you to compare 2 directories and perform actions such as merge-left, merge-right etc… Opendiff simply launches FileMerge OS X utility, which is another one I didn’t know about, and displays differences between 2 […]

Read More

Bandwidth throttling on OS X

I’ve been using Charles HTTTP Proxy for bandwidth throttling and network monitoring in general. It’s a great little tool, but when it comes to bandwidth throttling, it will only throttle HTTP and HTTPS traffic on ports 80 and 443 respectively. I thought there had to be a way to throttle bandwidth on any port using […]

Read More

bash script useful tips

I’ve spent last 2 days scripting virtual server deployment on Amazon cloud. For my reference, these are some useful commands I had to use to get the job done. 1. Hash “Hello World” string using SHA256 algorithm echo -n "Hello World" | shasum -a 256 You can also hash a file shasum -a 256 myfile.ext […]

Read More

AES-128 padded encryption/decryption with Railo, Java and AS3

I’ve recently been working on text file decryption using Railo server. My files were encrypted in ActionScript 3 with the powerful AES-128 algorithm. For more info on AS3 encryption see Hurlant Crypto demo. My challenge was to decypt this heavily encrypted content on a different platform, i.e. Railo with underlying Java Cipher capabilities. The 6 […]

Read More

Increase PHP file upload limit

I tried uploading a large file from Flash to php back end and got the following error: PHP Warning: POST Content-Length of 18348279 bytes exceeds the limit of 8388608 bytes It’s self explanatory, my PHP installation by default only allows up to 8MB of data to be uploaded to the server. To solve this you […]

Read More

Unzip files with ColdFusion MX 7 using native Java classes

This week I had to unzip some files using ColdFusion 7 (I know it’s ancient technology) and I realised that CF7 doesn’t natively support zipping/unzipping of files! ?Fortunately, ColdFusion can utilise the underlying power of Java to achieve this. ?I found this neat Java article – Unzipping Files with java.util.zip.ZipFile and simply translated it into […]

Read More

Flash to Flex ComponentEvent coercion error solved

Today I had an interesting problem embedding a swf file compiled in Flash Professional CS3 into Flash Builder 4. My SWF file contained a Flash TextArea component, which dispatches a ComponentEvent when scroll bars are activated. This event resulted in the following error in Flex: TypeError: Error #1034: Type Coercion failed: cannot convert fl.events::ComponentEvent@1b06b4c1 to […]

Read More

Upload file(s) via SSH using SCP

Here’s another useful command line utility – Secure Copy or SCP, that allows you to securely transfer computer files between a local and a remote host. sudo scp localfile.dmg remoteuser(at)somehost.com://pathtoupload/ Much neater that using an SFTP client no? Thanks to my work colleague Luke for bringing this to my attention 🙂 Marko

Read More

Monitor Railo on Tomcat using JConsole

I’ve been trying to get to the bottom of a “Java Heap Space” error on my local Railo installation and decided to use?JConsole?to monitor Tomcat server. ?JConsole?is a very useful Java application monitoring tool, which is bundled into every JRE. ?You can run it by simply executing jconsole binary: $JAVA_HOME/bin/jconsole Where $JAVA_HOME is the path […]

Read More