Shellinabox Gentoo Init Script
I’ve been playing around with ShellInABox and I think it is quite neat. From the website:
Shell In A Box implements a web server that can export arbitrary command line tools to a web based terminal emulator. This emulator is accessible to any JavaScript and CSS enabled web browser and does not require any additional browser plugins.
So basically it gives you a shell to your local system wherever you go (as long as you have a browser that was released since the turn of the century). This can be especially handy if you are on a public machine without permissions to install software (such as putty). The only dis-advantage is that the remote machine has to be running shellinabox, so this will not work for shared hosting environments. However, if you setup a shellinabox machine, you can then SSH into other boxes that aren’t running the daemon.
I’m running Gentoo Linux on my utility machine, and shellinabox doesn’t ship with a gentoo init script. Please enjoy the one I have written below. Basically, you install shellinabox normally, then I copied its generated certs to /var/lib/shellingabox to be used for ssh connections.
Corrections and improvements are appreciated.
/etc/init.d/shellinaboxd:
#!/sbin/runscript # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ CMD=/usr/local/bin/shellinaboxd CERT_DIR=/var/lib/shellinabox PIDFILE=/var/run/shellinabox.pid depend() { need net } start() { ebegin "Starting Shellinabox" start-stop-daemon --start --pidfile $PIDFILE --exec $CMD -- --cert $CERT_DIR -b=$PIDFILE eend $? }
Translink Zend Framework API
Translink is the local public transit provider for beautiful Vancouver, Canada. The system consists of Buses, Boats and Trains. Translink released an Iphone app some time ago that allows the lookup of bus information. Michael Weisman was kind enough to write about the “hidden” api that is used by the Iphone app to preform AJAX calls.
Read the rest of this entry »
Inject Dojo Bookmark
Sometimes it can be handy to inject Dojo into pages that would not otherwise have it. I’ve used this so I can use dojo.query() on a page to select DOM objects while testing a parser in a different language.
Use drag this link into your bookmarks and have Dojo at your fingertips no matter where your browser takes you:
Inject Dojo v.1.3.2
Wordpress Plugin: Save FTP Information
When Wordpress cannot directly access the filesystem to do plugin updates / installs, it falls back to using FTP to preform the changes. However, this commonly requires the user to enter their FTP information on each change. I have created a wordpress plugin that will permanently save the FTP information without the need to edit the wp-config.php file.
Check it out Here
BC Lottery Corporation API
The British Columbia Lottery Corporation has an unpublished API that they use to pull data down for the flash application on their home page. The Zext PHP API exposes functionality to query the most resent winning numbers from the BCLC website, as well as retrieve current jackpot estimates for the main lotteries in this province.
Read the rest of this entry »