Executing Commands Remotely with SSH

Posted by John
on Sunday, 05 October 2008

Turns out you can actually run commands remotely via SSH, plant some scripts on your server and boom you can clear your logs, backup your db and restart your webservers all without having to remote in; major help!

For example;

ssh -i /home/me/.ssh/mybox root@mybox.com '/var/www/apps/myapp/start-myapp.sh'

Here I'm specifying an ssh key file to use to connect to the remote box via the -i parameter, then the username root (because we want the script to have all the power it needs to without specifying sudo; web address of the box (or you can use the ip address). Then surrounding the command I want to run in single-quotes.

Simple effective and saves me from remoting in one night when I'm not myself, hitting the wrong key & doing something I really shouldn't ;-)

Maintainable CSS Systems

Posted by John
on Thursday, 02 October 2008

Natalie Downe gave an extremely good presentation at BarCamp London on the use of CSS Systems in order to standardize your site's stylesheet design, and make it much easier to maintain.

Lots of good pointers in this one, definitely worth a look.

CSS Systems
View SlideShare presentation or Upload your own. (tags: bulletproof robustness)

Swiftfox + Flash (under 64bit Hardy)

Posted by John
on Thursday, 02 October 2008

Swiftfox is like Firefox, but hellishly optimized for your Linux build, you can get it from...

  • Go here
  • Then download the installer right for your build (if 64-bit, download Athlon 64)

Once downloaded, navigate to the download in Terminal and do,

sudo sh install-swiftfox.sh
Flash

Now to get Flash running first check the ~/.mozilla/plugins directory exists on your machine, if not create it...

mkdir ~/.mozilla/plugins

Adobe only provide it as a 32-bit library but with the necessary dependency you can support it so run...

sudo aptitude install nspluginwrapper

Once you've got that you should be capable of handling the 32-bit Flash player,

...grab Flash from here

Download the .tar.gz version, extract it to your desktop, then move the libflashplayer.so into the ~/.mozilla/plugins directory,

sudo mv ~/Desktop/install_flash_player_9_linux/libflashplayer.so  ~/.mozilla/plugins

And finally restart Swiftfox, navigate to a flash video here and enjoy faster browsing with Swiftfox + Flash!

Aptana on Eclipse 3.2 Hardy

Posted by John
on Monday, 29 September 2008

Had some problems installing the Aptana plugin into Eclipse 3.2 on Hardy,

sudo aptitude install eclipse

Then,

sudo apt-get autoremove --purge gcj-4.2-base

Replace,

sudo aptitude install Sun-Java6-jdk

Then install remotely as normal

Eclipse 3.4 on Ubuntu Hardy

Posted by John
on Monday, 29 September 2008

Finally got a working install of Eclipse 3.4 on Ubuntu Hardy 64-bit, here's how...

sudo apt-get install openjdk-6-jdk

Now update your bashrc file,

nano ~/.bashrc

...adding this line at the end,

export JAVA_HOME=/usr/lib/jvm/java-6-openjdk/

Then download Eclipse 3.4

wget http://ftp.osuosl.org/pub/eclipse/technology/epp/downloads/release/ganymede/R/eclipse-java-ganymede-linux-gtk.tar.gz
tar xzvf eclipse-java-ganymede-linux-gtk.tar.gz
mv eclipse eclipse3.4

And start with...

eclipse3.4/eclipse

Thanks goes to jhcore.com for this one

Update

This didn't work for me but it might help someone in different circumstances, will keep hacking at it; eventually it'll work.