ninjin's - Code page


Below you can find some code that I have written. I try to distribute it all under the same license, which is the BSD license. Here is a copy of it.

Python scripts

IMPORTANT! Some of the scripts need to be configured before you can run them! Just open them with your favourite editor and change the variables under CONFIGURATION.

I have made a collection of python scripts for conky. They have various tasks and in the end you get something like this. Their names all look like this conky name .py .

conkyPing.py
Pings a given host and prints arg[1] if up and arg[2] if down. Useful to keep track of important hosts using conky.

conkyFreeNetStats.py
Parses a file generated by the fnupsStats script (can be found below) and then prints it. Useful to keep track of the activity of your FreeNet node without having to access the darknet page.

conkyPortsTimeStamp.py
Prints the time of your latest Portsnap (FreeBSD).

conkyWeather.py
Using PyMETAR it checks the weather from a weather station of your choice and prints it.

fnpsRefInsert.py
Inserts a reference into your FreeNet node using Telnet. It only supports the insertion of a url containing the reference. But since FCP now supports these kinds of insertion commands I am not sure if I will ever implement the insertion of a raw reference.

fnpsStats.py
Parses the information from your FreeNet darknet page and saves it to a file.

setWidth.py
Sets the maximum width of a text-file. I use this so that I won't have to use html in order to make text appear formatted in a browser. It's not 100% tested and it's behaviour isn't exactly what I wanted but it works.

Configuration files

Here you can find some configuration files that you might want.

.conkyrc
My conkyrc, produces along with some of the above python scripts something that looks like this.

nadacshrc
A rather straightforward csh configuration intended for new students at NADA. During the introductary course I overheard a lot of complaints regarding the default configuration and I hope this conf will keep students from switching shell and cause less annoyance to those new to Unix.
To use it:
1.) Download it to your home folder.
2.) Rename it to .cshrc using "mv ~/nadacshrc ~/.cshrc".
3.) Since your current terminal won't reload the .cshrc conf, restart the terminal.

Disclaimer

The opinions expressed on this page is not in any way related the opinions of RIT or it's affiliates.

Contact

Administrator: ninjin <\!at> kth <\!dot> se
Last updated: 3 September 2006