Currently using a development version of Wordpress as it has a few features I want, that I would usually use plugins for. Overall the new version has a much better looking admin panel and seems faster. So far my favorite feature is the customizable links widgets and the new widget management. It’s also much easier to navigate some sections, such as plugins. You can filter views, such as activated plugins, or plugins that need updates. Looking good so far.
Wordpress 2.8-beta2-11472
May 30th, 2009 § 0
Uni exams approaching
May 28th, 2009 § 0
With my very first uni exams approaching I have decided to take 2 weeks off from work to help prepare me for my exams. I have a week and a half to study and relax before the exams, which should provide me with the best possible result. I’ve read a few suggestions on how-to effectively study and work on a task, which I will try.
Splitting time into blocks helps stay focused on tasks. The idea is to split your day into blocks of time, such as 15 minute intervals, and switching tasks each block. This helps keep your mind fresh, and stops the task from becoming boring or repetitive. Let every 3rd or 4th time block be fun, such as a computer game or a video.
Write, don’t read.. Rather than reading a text book, and continue on the next task, write notes as you go. This helps you remember what you just read, and also helps you get your ideas onto paper. Great for exams.
Answer questions where possible. Most text books or uni courses have questions per chapter of text books, fill these out. Most of the time they only take a few seconds, but make sure you write the answers down and check them. If they don’t have questions, make them.
Noise environment. I can’t work in a dead silent room, nor a noisy room. I like to find a nice quite place and listen to some nice classical or ambient music, usually fairly loud. This helps to stimulate my brain.
Remove your self from distractions. It’s that simple.
I hope to be employing all these techniques next week to ensure I get the best score possible.
Also thanks to Sprocket Web Design for providing me a new kickass logo for my blog.
Wolfram|Alpha
May 17th, 2009 § 0
I fell in love with Wolfram|Alpha after reading this comic. The site is so god damn easy to use and find information it’s not funny. You type in what you need to know, hit enter, and it comes up.
Wolfram Alpha is a knowledge engine (It’s not a search engine or a google killer) which finds and calculates information for you. There are thousands information sources which it queries and provides very concise, but detailed answers.
Give it a go, I can find this being super handy for my uni studies. Wolfram|Alpha The only thing it’s missing is a short name.
Upside Down Net
May 10th, 2009 § 3
Updated my upside down ternet scripts for my wireless guest network. Now it includes upside down text :> The new script works by redirecting all requests to phproxy (poxy) which then turns images upside down and runs a javascript to upside down the text.
Link to download is here.
Please note that this is heavily based off phproxy and a javascript text flipper. Credits are in files included.
Find which ports are unused over a period of time.
May 6th, 2009 § 0
Below is a simple bash script which uses snmpwalk to find out which ports on a Cisco switch (It should work on other as well) aren’t being used, over a period of time. It works by checking if the port is up or down, if it’s up it’ll remove it from the list of ports. For best results, set the script up for a crontab of about 5 to 15 minutes, and then come back in a few weeks to see which ports are inactive.
#!/bin/bash
date
WORKDIR=/root/
IPs=( 10.0.0.1 10.0.0.2 ) #IP addresses seperated by spaces
# Start making indexes if file doesn't exist
for IP in ${IPs[@]} #Loop through list of IPs
do
if [ ! -f $WORKDIR$IP.index ] #If the ip.index file doesn't exist then create it.
then
snmpwalk -v1 -c snmpass $IP 1.3.6.1.2.1.2.2.1.2 > $WORKDIR$IP.index
# We walk this snmp value to get the names of the interface so we can find them on the switch easier
fi
INTERFACES=`cat $WORKDIR$IP.index | sed 's/IF-MIB::ifDescr.//' | sed 's/ = STRING.*//'`
#Get a list of interface IDs
for INTERFACE in $INTERFACES
#Loop though each interface ID
do
if [ `snmpwalk -v1 -c snmpass $IP 1.3.6.1.2.1.2.2.1.8.$INTERFACE | \
sed 's/IF-MIB::ifOperStatus\.[0-9]* = INTEGER: //' | sed 's/([0-9])//'` == "up" ]
#We then sed the snmp results to get up or down state
then
echo Success $IP / $INTERFACE is UP - Removing from list
#We echo if an interface is up
mv $IP.index $WORKDIR$IP.index.tmp
#We need a temp file since we can't read and write at the same time in a pipe
cat $WORKDIR$IP.index.tmp | \
sed "s/IF-MIB::ifDescr.$INTERFACE.*//" > $WORKDIR$IP.index
#remove the interface that is up and pipe it to the index file
rm $WORKDIR$IP.index.tmp #remove the temp index file
fi
done
done
rm $WORKDIR*.index.tmp >/dev/null 2>&1
#Do a quick clean up incase we left some files behind. This should always return an error




