I was recently asked by @beanstalkapp to write a blog / tutorial on my Node JS Hook Server, but I'd like to start by mentioning how awsome of a service beanstalk is for version control. Not only do they host SVN and GIT but their deployments rock, and saved us alot of time having to write our own deployment tool. We use it by creating 2 deployments per project, one to the Development environment and one to the Production environment. The Development environment is almost always set to automatically deploy every commit, saves us the trouble of checking into version control and then FTPing. *AWSOME* not only does that simplify our development cycle it gets us to check-in all of our code on a much more consistant basis than we probably would if we FTP'd everything. We use GIT, we started with SVN but moved to GIT when we...
Backup a SQL Database and email it.

So recently we needed rapid backups of one of our MySQL servers. As everyone know server admin tasks are not my favorite thing to do, but it is obviously a need in our development environment so I got to thinking what was a quick reliable way to accomplish this task. The backup is easy:
Write a small script to dump the db:
#!/bin/sh timestamp=$(date '+%d-%m-%Y@%H:%M') mysqldump -u dbuser -pPassword --all-databases | gzip > /tmp/path/for/backup/database_$timestamp.sql.gz
This is a bash script that stores the current timestamp to a variable then goes about dumping the databases to text and piping that to gzip which outputs a gzipped version of the DB. Compression is good since we're going to email it to a Gmail account for storage and we wanna maximize our 7 GB of backup space.
$timestamp in our filepath is replaced by the timestamp we generate above.
Next we actually need to mail this file to our backups account, after a short research session i came across mutt. Which seems to fufill the requirement of sending a email with an attached file easily from the command line:
mutt -s "Hourly backup from c4.kohsrv.net |... iPhone SDK: Application crashes in debugger or Registering for push notifications failing
I’ve recently been doing some iphone dev and ran into these two problems. I traced the issue down to the fact i had been doing JailBreak development with xcode before enrolling in the apple developer program. When setting up xcode to not codesign I set a couple plist values as NO. Specifically ENTITLEMENTS_REQUIRED, the two problems described are a result of this. If you are having this problem, either restore your backed up plists or reinstall xcode and try to build your project again. You may need to clean your targets.
Watching Divx and Flash Video on IPAD
Both are now possible without jail breaking by purchasing yxplayer, I love it so far after i figured out how to work it.
Although a bit choppy at times atleast while streaming divx, not sure if its my connection or the codecs choking?
it seems to catch up eventually and defiantly a step in the right direction.
The quick how to for streaming divx from the web is:
1) Find a Stage-Vu player (Could be any player but stage-vu definatly works) - Safari (You can try the built in browser but it was giving me issues on the pages i was browsing)
2) Hold down the download button on player till...
How to watch Divx Movies from a SD Card or USB Drive on IPAD
So i was hacking around on the ipad the other day and came up with a way to play video from a SD Card or USB Drive on the IPAD, IF you are jailbroken.
What you need.
- Jailbroken iPad with SSH
- Camera Connection Kit.
- A good knowledge of how to SSH into an iDevice (Google this).
- yxplayer or something similar OPlayer HD might work as well as CineX but ive only done this with yxplayer. (These are app store apps). If you can find a free multi format player you can try it, i make no guarantees tho.
How-to:
1) Identify your mount point for SD & USB Drives. I use iFile (Cydia) for this but you can also do: ls /var/mnt in most...
How to play FLV files on Offical VLC for iPad
Here's a simple overview on how to play FLV files on the Official VLC for iPad app.
- Download VLC for iPad from app store free
- Plug iPad into itunes, Select iPad, goto Apps Tab, Scroll to bottom (File Sharing).
- Select VLC
- Click add. Locate any flv files you want to transfer and rename them to end in .AVI
- Add them.
- Open VLC and enjoy FLV on iPad. (Seems a bit more choppy than the XVID movies i tried which went really smooth.)
Pretty simple, right?