anujbhatt.com
home /
blog /
undergrad stuff
Tweaks that do the trick!
NOTE
All code provided here is on a "AS IS" basis. I, as author or coauthor, do not take responsibility for the effect this code has on your machine. All code has been tested prior to its upload. However, it's not been tested exhaustively. Use at your own desire.
red (pronounced "ready"): An attempt.
View source(pretty printed) -- Plain
A lame attempt at doing what ReadyBoost does. But really, this is more like a spoof on ReadyBoost. I guess code parody is the next big thing? If so, here is an early submission.
anuj@slackbot:~/src/python$ su
Password:
root@slackbot:/home/anuj/src/python# ./red -m
Detected device /media/PHOENIX with available space 3102940
Proceed? (y/n)y
Creating swap space on /media/PHOENIX
Too much space available, using 1000
1000+0 records in
1000+0 records out
1024000 bytes (1.0 MB) copied, 0.0357275 s, 28.7 MB/s
Setting up swapspace version 1, size = 1019 kB
no label, UUID=e5469591-fe8a-4e44-bf1b-4ebc1cef37bf
root@slackbot:/home/anuj/src/python# cat /proc/swaps
Filename Type Size Used Priority
/dev/sda6 partition 6140920 34764 -1
/media/PHOENIX/swap file 992 0 -4
root@slackbot:/home/anuj/src/python# ./red -h
red: A script that tries to emulate what ReadyBoost does (but not quite).
RUNNING
#./red [-mrh]
OPTIONS
m: make cache on attached device
r: remove cache on attached device
h: help (This message will be printed again)
root@slackbot:/home/anuj/src/python# ./red -r
Removing cache/swap space from /media/PHOENIX/swap
Done removing /media/PHOENIX/swap
root@slackbot:/home/anuj/src/python# cat /proc/swaps
Filename Type Size Used Priority
/dev/sda6 partition 6140920 34764 -1
apt-o: The "oblivious" tweak.
View source(pretty printed) -- Plain
We all know of apt-get and apt-cache. Having used Fedora and living in the yum world, I wasn't aware of which command belonged to apt-get or apt-cache specifically. Thus, apt-o. Now you don't need to know which verb command like "search", "install" or "update" belong to what apt-*? the syntax simply becomes: $ apt-o search xmms or $ apt-o update and so on. Srichand (of Java-GNOME fame) further tweaked the code to get rid of the things which were not required and added those that he thought were.
To install: chmod +x apt-o -> su -> mv apt-o /bin/
get-servers.py
This is very much work-in-progress. It gives you a list of sorted servers based on the round trip time from your system to them. get-servers.py, as of now, probes PlanetLab nodes (320 servers distributed across the globe) and returns the sorted list.
Read the PDF for more details.
Read: PDF. Download will be made available soon.
Automated Tomcat installation for network-wide systems.
Something Srichand and I wrote back in 6th sem (I think). Was used for "Java/CGI Lab" at MSRIT. Since going to each system and installing it manually would be cumbersome, this shell script was written.
Download gz.