Thursday, November 21, 2013

Mobile Friendly GPA Calculator


Grade Point Average represents the average of a student's grades during any given period. A college GPA is calculated by taking a numerical representation for a grade for each class, and multiplying it by the weight of the number of units a class is worth to get a grade point for that class. Next add up all of the grade points and add up all of the attempted units, and divide the total grade points by the total attempted units to get GPA

High School GPA Calculator
High school grade point average is calculated very similarly, except instead of using the number of units a class is worth, we use a weight. This weighted gpa calculation is very simple, a regular class is worth 4.0 credits, an honors class worth 4.5 credits, and a college level class is worth 5.0 credits, giving the student a maximum GPA of 5.0.  The High School GPA Calculator can do this quickly and accurately.

This is extremely simple math, but doing this quickly in your head, on a calculator, or on a spread sheet takes time. Luckily for us, our friends a Taylored Tools wrote this amazing little GPA Calculator that lets you simply choose your grades, choose the weight of the class (regular, honors, or college credit) and it will automatically calculate the your GPA for you. This calculator works great on my iPhone, tablet and computer. It is all built into the web site, so there is no software to download, no apps to buy, simply enter your grades and brag to your friends. :)

Check out the GPA Calculator today!

Monday, October 21, 2013

Should I upgrade from Ubuntu 13.04 to 13.10 Saucy Salamander?

Ubuntu 13.10 is now available (you have 13.04).
Ubuntu 13.10 'Saucy Salamander'

I always get excited when Ubuntu asks if I want to upgrade, but then I am immediately filled with a small amount of fear.  What if I have to fix a bunch of problems caused by the upgrade and I am unable to use my computer for what it is intended for...work.

Ubuntu 13.10 Upgrade Available Welcome to Ubuntu 13.10 'Saucy Salamander'I don't know about you, but I like things to run smoothly, but I'm a sucker for new features and the promise of stability or performance increases.  When I upgraded to Ubuntu 13.04 I felt a little let down.  Up until this point almost every Ubuntu upgrade I did went smooth and came with some new features.  Although the upgrade itself went smooth, once I got all of my workspaces  setup (2 vertical, 4 horizontal for 8 total work spaces), I noticed some serious issues with my graphics card.  Once my machine was humming at semi-full capacity if I used CTRL + ALT + SHIFT and the arrows to bring a window with me to another workspace Unity would crash, sending all my windows into one big unorganized work space.  This is not optimal if your desktop/workspace is anally organized for efficiency.  I mean, I am so anal that once everything is setup I put off rebooting at all costs.  There are times I literally don't do a reboot for well over a month.


This begs the question, is the upgrade to 13.10 going to have the same ill effects on my productivity?  There are a few new bells and whistles, like the new Smart Scopes search and Steam, but the bottom line for me is that if the operating system is more stable then it will in fact increase my productivity.  This is my main concern, so I decided that I would make the leap...besides I haven't missed an Ubuntu upgrade in a few years, and I don't want all the hard work of these developers to go wasted on me.  Its funny, every time there is an Ubuntu upgrade available I find myself asking the question, "Is it Worth It?", and every time I end up deciding it is.  I mean, this isn't windows we're talking about here.  These upgrades actually fix things.  Novel idea, isn't it?

When I finally got around to checking out all the new features the upgrade had to offer it was Friday at about 4:00 pm, so I decided not to start the upgrade until Monday.  I knew if there were any small issues to deal with, I would not be excited to have to tackle them all first thing Monday morning before I started work.  Instead I decided to go home, and start the upgrade on my personal laptop to test things out.

The upgrade went extremely smoothly and after a quick reboot I got a chance to check everything out.  The OS looks exactly the same at first glance.  The first change you see is when you click on the Ubuntu icon on the Unity tool bar.  After clicking the Ubuntu icon click on "Filter Results".  I do think I will use this feature quite a bit, it is nice to be able to filter the results so specifically.

The New Smart Scopes Feature on Ubuntu 13.10


I did not take the change to check out Steam yet, but when I can take a break from being "all work" to enjoy some pleasure I will make sure to write an update.

Happy upgrading, and enjoy Ubuntu 13.10 Saucy Salamander!

Thursday, March 3, 2011

Monitor log file and send email alert when error occurs

I ran into a situation where I had an error occuring periodically, and I needed an easy way to be notified whenever the error occured, so that I could make some configuration changes to my server.  This script is fairly simple and should be able to be modified to fit many needs.  It basically looks at the tail of any given log file, and searches for a specific error code, or string.  Any time this error code occurs an email alert is sent out, and then the script sleeps for a given period (as to not flood my email box).


######################################################################
#!/bin/bash


errorString='SC-001'
recipient="xxsyntax@gmail.com"
sleepTime=10
logFile='/var/log/program/log'


x=1
while [ $x -gt 0 ] 
do
   checkLog=`tail $logFile | grep $errorString`
   if [[ $checkLog == *$errorString* ]]
      then
      echo "Error found, sending an email."
      echo "$checkLog" | mail -s "Alert:  $errorString" $recipient
      sleep $(( $sleepTime * 60 ))
   fi
done

######################################################################

Wednesday, March 2, 2011

Use special characters as variables in bash

I have often run into problems where I needed to use a special character, such as a tab with grep in bash, and was unable to pass the tab as "\t".  I had to define a variable as the tab character using the octal value of the tabcharacter.

For instance, to grep for "foo(tab)bar" I had to do the following:
tabChar=`echo -e '\011'`
grep "foo${tabChar}bar" < input
Here is a list of the octal values of a few special characters that may be handy.



OCTAL ESC'D CTRL DESCRIPTION
007 \a Ctrl-G Alert/Beep
010 \b Ctrl-H Backspace
011 \t Ctrl-I Horizontal Tab
012 \n Ctrl-J Newline (line feed)
013 \v Ctrl-K Vertical Tab
014 \f Ctrl-L Form Feed (clear terminal)
015 \r Ctrl-M Carriage Return
033 \e Ctrl-[ Escape
047 \' Single Quote
134 \\ Backsplash


I hope this list helps.

Friday, February 25, 2011

Compile list of IPs & PTR Records from list of IP Addresses

Simple bash script to compile a list of IP Addresses and corresponding PTR Records from a list of IP Addresses.  Make sure to give this file executable permissions (chmod +x filename).  This script will read the input file, use dig to lookup ptr records, and will output a list of the ptr records and ip address.

#!/bin/bash
inFile="input_list"
outFile="output_list"
ht=`echo -e '\011'`   # tab character
for ip in `cat $inFile`
   do
   in_addr=`echo $ip | awk -F'.' -vOSF='.' '{ print $4"."$3"."$2"."$1".in-addr.arpa" }'`   ptr=`dig PTR $in_addr | grep "IN${ht}PTR" | grep -v ';' | awk -F"$ht" -vOSF="$ht" '{ print $3 }' | sed 's/\(.*\)./\1/'`
   echo "$ptr  $ip" >> $outFile
done

sort list of ip addresses

Simple bash command to sort a list of IP Addresses, sorted ascending, by each octet.
# sorts file "sloppy_ip_list" into new file "sorted_ip_list"
sort -u -n -t . -k 1,1 -k 2,2 -k 3,3 -k 4,4 < sloppy_ip_list > sorted_ip_list


List all ip addresses on linux box, sorting in ascending order.
ifconfig | grep inet | cut -d ':' -f 2 | cut -d ' ' -f 1 | sort -u -n -t . -k 1,1 -k 2,2 -k 3,3 -k 4,4