Monthly Archives: December 2012

Beginning Python on Ubuntu

Ninja IDE Python Ubuntu

I am using Ubuntu 12.10 but with Gnome Fallback session rather than Unity. I was testing out Python by creating a little program to notify if the input year was a leap year or not. I found Ninja IDE useful but had to Edit > Preferences and set the Python path to python3 as shown… Read more »

Oolite Keyboard Layout Ubuntu

To create a custom keyboard layout for Oolite on Ubuntu: mkdir -p /home/jonny/.Oolite/AddOns chown -R jonny:jonny /home/jonny/.Oolite gedit ~/.Oolite/AddOns/keyconfig.plist Download the Key Config tool extract it, open the web page and generate the keyboard layout you want. Paste the output into the ~/.Oolite/AddOns/keyconfig.plist file. For reference the default keyboard layout file is at: /usr/lib/GNUstep/System/Applications/oolite.app/Contents/Resources/Config/keyconfig.plist

Bash Shell Script to Automate FTP File Transfer

A little script to send a backup file to a remote FTP server: #!/bin/bash HOST=’123.111.123.111′ USER=’bak_user’ PASSWD=’OpEnSeSaMe’ TODAY=”$(date +”%Y%m%d”)” FILENAME=Hostname_$TODAY.tgz cd /var/backup/sched/ ftp -n -v $HOST << EOT ascii user $USER $PASSWD prompt cd backups put $FILENAME ls -la bye EOT Then run it every day from Cron.

IPTables Custom Chain for SSH access

I wanted a custom IPTables firewall chain to allow SSH access to a machine. The idea is that users hit a web page that adds their dynamic IP address to a list and then a script inserts that IP address into IPTables to allow SSH access. I achieved this as follows. In /etc/sysconfig/iptables I added: *filter… Read more »

Adaptec Hardware RAID controller on Sun 4150

On our Oracle Sun x4150’s the Hardware Raid can be checked after installing the StorMan software which is available (as StorMan-6.40.x86_64.rpm)  in the software bundle for x4150s available after logging in to the Oralce support website and locating the downloads for x4150s. The download is pretty big (931MB) when the 39MB RPM is all you are… Read more »

SSH tunnel

The following created an SSH tunnel from my local desktop port 8181 to a remote server port 8181 on which Squid was running so I could point my browser to local port 8181 and the web browsing traffic would be sent over an encrypted connection: ssh -f -N -q -L 8181:localhost:8181 johnny@remoteserver.com -f tells ssh… Read more »