Tuesday, September 20, 2011

GET OFF MY LAWN!


So I'm a homeowner. Have been for two years now. And what do you get when you own a house? A dog. Meet Frankie.


Frankie is a hyper but lazy dog. He's hyper when something exciting is happening, like going to the park, car rides, giving him milk cartons to play with; and he's lazy the rest of the time. So he typically just sits on the backporch steps 99% of the time he’s outside. I often have to yell at him to get off the deck to actually go do his business when I let him out in the mornings. I think it may have to do with his tether. We don't have a fenced in yard so Frankie is on a 20' braided tether that's anchored in the center of the backyard.

One thing that's always bothered me about where we live is the kids use my backyard as a road between our cul-de-sac and the one behind us. Now, I was raised to NEVER cut across somebody's yard without their permission. I even remember my older brother talking to me about this when I was 8 or 9 years old. Also, you’d think a 40lb dog would deter kids from cutting through the yard.

But tonight the funniest thing happened. We're having our piano tuned so Frankie is sitting on the back porch tied up to his tether.  I'm at the kitchen table when I hear Frankie skate off the deck... Barking! This out of a dog that doesn't bark. "Something’s up" I think to myself, so I go outside to see what’s going on. And Frankie is all fluffed up barking at this kid trying to cut through my yard.
          "HEY!" I yell to him.
          "Hey" he melancholily responds, barely looking up at me but continues on his way down my yard. He’s short; well probably 5’4”; average I guess for a fourteen year old. His long healthy black hair stops just below his shoulders and is died orange for the last four inches. He’s in baggy black jeans and a baggy black t-shirt.
          “What are you doing?” I demand of him.
          He mumbles back at me, this time stopping to acknowledge my existence.
          “Don’t be cutting through my yard. Go around.”
          He mumbles back at me again, but continues on down the yard.
          I figure, “He must not have heard me the first time; I’ll repeat myself so maybe he gets the picture.” “Don’t be cutting through my yard. Go around!” chewing on the words so they sound more authoritative. By this time, Frankie has returned to the deck.
          “I’M LOOKING FOR MY PHONE!”
          “Alright, hurry up! But if my dog gets ya, I ain’t stopping him.”
          To which Frankie responds by darting off the deck at the kid. Lucky for him he was right against my neighbor’s fence and Frankie’s tether stops about two feet shy of the fence. The kid bends down and stands up again (I don’t actually see a phone in his hand but whatever) and heads out of my yard, the same way he came in. But just before he gets out of earshot, I reach down to Frankie and give him a real good pet and say “GOOD DOG!”

GET OFF MY LAWN YOU KIDS

Some pictures of my "vicious attack dog"


Frankie asleep on his pillow

Frankie enjoying a car ride


Sunbathing


"What?"

Thursday, September 08, 2011

Ten minutes before class starts

Well I'm back in the saddle again. School that is. And I've got a full plate this semester. But I will be able to keep up thanks to my handy Android phone and a great app called GTasks. Gtasks syncs with my Google Tasks in the cloud and allows me to manage them on my phone. It has a good clean interface and is simple and straight forward. One shortcoming I've found with most task apps, and GTasks is no exception, is the lack of ability to effectively categorize or prioritize a given task. But I've figured out a way to do this myself. Before I enter each task I consider its priority according to the FranklinCovey method and then enter it preceding the task such as:
     [A1] Mow the grass.
And for my school work, I tend to understand those tasks by category so I will enter:
     [678] Finish GDB lab.
Where 678 is the course number. EECS 678 = Intro to Operating Systems

See, something you've gotta know about me is that I used to work for FranklinCovey Retail Stores. I learned so much while I was there about working according to your highest priorities, setting SMART goals, and time management in general. One thing in particular I learned from their time management seminar was the four cores of the FranklinCovey planning system: contacts, calendar, notes and tasks. Now my Android phone yields itself very nicely to managing my calendar and contacts. But ever since I switched to a smartphone and away from a paper planning system, I've struggled with an effective solution to last two: notes and tasks. Notes aren't so much a concern for me as most of my note taking is relative to my classes for which I have notebooks. The tasks are the kicker though, but not anymore thanks to solution i described above. This simple approach helps me to keep organized and on top of the 1400 things I have to do. Maybe this will help you. Try it. I'm gonna go mark this off my tasks list now.

Wednesday, August 10, 2011

KanRockSas

So a friend of mine text me up Friday morning asking a seemingly innocent question.
     "Do you like Muse?"
     "Yeah, they're pretty good. Do you like Zero 7?.... Why?" I responded. (I was watching their video for "In the Waiting Line"
     "I have Kanrocksas tickets for tomorrow if you want them."
     "Ummmm... YES?? Please???

So she just gave me these two tickets! AWESOME! Now who to take? My wife? Her taste in music is a bit softer than mine, she typically favors Taylor Swift, Kelly Clarkson or Darius Rucker. So Cage the Elephant, A Perfect Circle or Flogging Molly will be considerably harder than she's used too. Plus OK GO starts at 4:30 and Muse doesn't go on until 11:00, so that's considerably longer than she'd be up for especially with a two month old. Well she agreed with me, so now who of my guy friends to invite? I finally decided on "Johnny".
So the line up, complete with youtube videos illustrating the music for my wife:


OK GO4:30 PMAd-Astra Stage http://www.youtube.com/watch?v=qybUFnY7Y8w
Cage The Elephant6:30 PMAd-Astra Stagehttp://www.youtube.com/watch?v=5t99bpilCKw
Flogging Molly7:30 PMStageasaurus Rexhttp://www.youtube.com/watch?v=pDwlGbEcJ6Y
A Perfect Circle8:30 PMAd-Astra Stagehttp://www.youtube.com/watch?v=tWFv5ZoVET8
The Black Keys9:45 PMStageasaurus Rexhttp://www.youtube.com/watch?v=mpaPBCBjSVc
Muse11:00 PMMain Stagehttp://www.youtube.com/watch?v=w8KQmps-Sog

So at this point, I'm stoked! I've always wanted to go to one of these festivals but haven't for one reason or another, typically morals or money. These shows aren't cheap and I've heard the stories of Rockfest.This show is free and I figure it isn't Rockfest, so it will hopefully be a little better.

So things to talk about:

The Speedway (the venue)
I think they chose an ideal location. Everything was nice and spread out but this did involve a considerable amount of walking. When you walk out into the stands, you walk down some stairs and have the rare pleasure of actually walking on the track. This was my first time at the the Speedway, but it was still a moment of "Holy Crap! I'm walking on the track that cars run around at 200+ mph. COOL!"

The Bands:
OK GO: Great Show. The guys seemed to have the same personalities on stage as they do in their videos and appearances: low-key but excited to be doing what they're doing. Odd thing I noticed, a couple of them are married. The lead singer did some "Hippie [Stuff]" and came down into the crowd and played something acoustic, I don't remember what it was. Of the songs I remember, they played "A Million Ways to be Cruel", "Here it Goes Again", "White Knuckles" and of course they ended with "This Too Shall Pass"

Cage the Elephant: I gotta say I was disappointed with this show. The lead singer forgot the words in a few places, kept stumbling around, and repeatedly walked in front of the speakers with mic in hand. I learned later that the he was supposedly tweaking. Irritated and disappointed. Of the few songs of theirs that I've heard on the radio, I was pleased but those moments were few and far between and the singing was often done more by the crowd.

Flogging Molly came out with a ton of energy and the crowd ate it up. With the start and finish of every song, the lead singer took a draw on his Guinness. I only stayed for about half of this show due more to exhaustion and hunger than anything. 

A Perfect Circle: We got there late. So we didn't have a great spot. But that didn't matter much. The show was a visual feast. The set was much less cluttered with Cage and OKGo's gear out of the way. The first thing I noticed was the lead singer was on the back left corner of the stage facing the rear curtain. I later learned that he likes the attention to be on the other band members rather than himself. I also learned that the crowd was pushing on the front barrier crushing the people up there. Apparently he paused and wouldn't continue until the safety folks said it was okay. That's cool. Thanks Maynard for taking care of your fans. The music was angsty and soothing. It draws you in much the way Tool does.

The Black Keys: We only stayed for the first two songs. Basically, they weren't that exciting to us and that exhaustion thing set in again so we went and set on the grass waiting for Muse with good spots picked out.

Muse: Amazing! I loved the fact that they signed up for a 90 minute show and they played almost every one of those 90 minutes. Lasers, smoke, hexagon LCDs in tandom, the only thing they were missing were pyrotechnics. And holy crap Matt Belamy can shred lead guitar. I have since bought several of their songs off of Amazon. We were about 50 feet from the stage and dead center right along the center aisle

The atmosphere ( everything else)
The Good: Samsung Charging station and Philly cheese steaks. "People are going to be here for hours on end, lets give them a place to charge their cell phones." Brilliant!

The Bad: drugs and scantily clad women. yep I didn't appreciate either of these.

In all I had a great time, but I doubt I will be returning again next year for the same reasons I've never attended an event like this before, morals and money.

Thursday, August 04, 2011

Linux Command Line Quick Intro

hehe... Quick.

So a friend of mine, let’s call him Aaron, it’s a good name. Anyways... Aaron is fairly familiar with Linux, but isn't overly friendly with the command line. As he puts it, he likes "pretty things" and we all have to admit there isn't much pretty about the terminal. So I compiled my entire bash history, sorted and wrote/stole some explanations of how I use terminal and regularly used command line programs. Hopefully this helps somebody, maybe you. It helped me at least as an exercise in documentation.
So here goes:

/var/log/messages is your friend. This is where a lot of the daemons log to. I often use this in conjunction with tail and/or grep.

Tab completion is your friend. Start typing a command and then press tab once to complete it and tab twice to list all possible completions, works on directories, commands and aliases

#output the results of a command to a file, called piping. In this case it is ls
ls > output.txt
ls >> output.txt // this appends the output of ls to the file output.txt

#execute one command based on the output of the other, specifically standard out, this is apparently called concurrency. The following will list all running processes in full detail and find only the lines with “named” on it.
ps -ef | grep named

#execute one command after another
cd /root; ls

#find out what version of Linux you have
uname -a && cat /etc/*release

#move files from one host to another over ssh, must use full filepath from /
scp root@172.16.1.2:/root/.bashrc /root/.bashrc

# request new ip using dhcp
sudo dhclient

#restart networking has the same effect of requesting new ip.
/etc/init.d/network restart

# redhat based, ie redhat, fedora, centos, scientific
yum update
yum search
yum install
yum info
yum remove

#debian based, ie debian, ubuntu, mint
apt-get update
apt-cache search
apt-get install

#port scan remote host, not overly abusive
sudo nmap -T2 -v -A -PN

# Find files
# where /etc is the directory to search can also be . for the current directory and all sup
# directories and search by name of file in this case *.cpp
find /etc -type f -name “*.cpp” -print | sort -u

#find text in a file in filesystem
find . | xargs grep "text"

# un gzip and un-tar, works on *.tar.gz and also *.tgz
tar -zxvf file.tar.gz

#edit /user/donald/.bashrc to modify coloring of terminal and regularly used aliases
export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\W\[\033[00m\] $ '

#the syntax for PS1 varies this above works in Fedora 13
export SVN_EDITOR="/bin/nano"

alias ll='ls -l --color=auto --group-directories-first' // I use ll ALL the time

#and if I find myself constantly changing to one directory I’ll often set an alias of
alias cdproject=”cd /home/aaron/Documents

#install ssh server
apt-get install openssh-server

#install Webmin on Ubuntu
sudo su
echo "deb http://download.webmin.com/download/repository sarge contrib" >> /etc/apt/sources.list
echo "deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib">> /etc/apt/sources.list
wget http://www.webmin.com/jcameron-key.asc
apt-key add jcameron-key.asc
apt-get update
apt-get install webmin

#install LAMP on Ubuntu
apt-get install mysql-server mysql-client
apt-get install apache2
apt-get install php5 libapache2-mod-php5
apt-get install php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl
/etc/init.d/apache2 restart
echo -e "" > /var/www/info.php

Command My Description
alias print out all aliases currently in use, these are typically stored in your home directory in a file called .bashrc
cat .viminfo concatenate the output of the foo.txt to stdout or in otherwords print out the file
chmod+x install_webmin.sh change the mode of the file to be executable to all owners, groups and world
chmod 740 www same except explicitly defining the mode, b
Owner Group World
R W X R W X R W X
4 2 1 4 2 1 4 2 1
7 4 0
RWX R none

chown root:wheel manage.py Change the owner to root and the group to wheel of the file manage.py
chown root:root * -R Change the owner and group to root of all files and folders in the current directory and do it to all subfolders and files recursively
clear clear all text from the current terminal
cp
copies file or directories from source to destination, if wanting to recursively do directories, be sure to include -R
dd if=/dev/cdrom of=disc6.iso; eject create an iso of the disc in the drive and store it as disc6 in the current directory and eject aftwards
df display current disc utilization stat. Add -a for all discs and -h for human readable sizes
diff tmp.txt tmp2.txt display the difference between the two files specified
dig soecs.ku.edu dig up some dns info about the given server or domain
echo $PS1 print the contents of the given variable
echo d68d6c2e04c998>vmware.txt replace all contents of the given filename with the content specified, if filename doesn't exist, attempt to create the file
fg resume the last bg process
find . -size >1G find all files in the current directory larger than 1GB
find . -user jlfugett -print find all files in the current directory whose owner is jlfugett
find / -name *.sh -print find all files and where the extension .sh
find / -name *ldap* -ctime -0.04 find all files and folders where ldap appears in the filename created within the last hour, 0.04 is approx 1/24
find /etc -name klogd -print find all files and folders in /etc where the name of the file begins with klogd
g++ -c main.cpp compile main.cpp
gksudo wireshark run wireshark graphically as root, assuming you have gksudo installed
grep g++ -R * find all instances of the phrase "g++" in all files and subfolders
grep try *.py find all istances of the phrrase "try" in all files with .py extension in the current directory, do not recurse into subdirectories
groups <user> show all groups a user is a member of
gunzip totalvalidatorbasic.tar.gz just unzip the file total…tar.gzz
gzip totalvalidatorbasic.tar gzip the .tar file
hardinfo ubuntu: brings up the hardware info gui applet thingy
history print out all previously used terminal commands
history | grep nestat find all entries of the command netstat in history
hostname print the hostname
ifconfig <interface> print the current configuration of the specified network interface. If none is specified, all active interfaces will be printed
ifdown <interface> take the specified interface down
ifup <interface> bring the specified interface up
ip addr print the current ip configuration of all interfaces
iptables -L -n Print all current chains and rules in iptables
kill 1477 end the process given by the specified process id (PID)
less /etc/apache2/httpd.conf print the given file to the screen in a scrollable format. This is often used concurrently with another command i.e. "ll -a | less"
ln -s <source> <destination> create a symlink from the source file to the destination. Analagous to .lnk files in windows
locate PyQt4 search the locate database for files
lsof list open files
lsof -i tcp:80 list open files in use by port 80
man <command> get the manual or man page for the command specified, note program man must be installed and the command must have the man page installed, luckily both of these are typically done by default
md5sum <file> display the md5sum of a file specified
mkdir /home/donald make a directory called donald in /home
mv <source> <destination> move the file <source> to <destination>. I often use this instead of rename, because the end result is the same and mv is a lot less letters than rename
mysql -h localhost mysql client: connect to host specified
nano test.txt Nano is a basic text editor, open the specified file, if no file is specified, opens an empty file that can be saved on exit
netstat netstat is very similar to its windows counterpart,it shows all tcp/udp connections in or out of the host.
netstat -tan | grep LISTEN show ALL TCP connections in NUMERIC form, but only display the ones in listen state. Alternatively, use netstat -tanl
nslookup mail.google.com analogous to nslookup in windows, the internet recommends dig over nslookup
ntpdate -b <time server> set the time on the host to that specified by the given time server
ping time.ku.edu ICMP echo to host specified. I typically set an alias in my .bashrc ping="ping -c 5" because this will perform a never ending ping
ps --help get help for the command ps, the --help is useful for many commands
ps -ef print ALL(-e) running processes in FULL(-f) detail
ps -ef | grep wireshark same as above, except only show the lines with "wireshark" in them
pwd Print Working Directory, show what directory you're in
reboot reboot the computer, must be root or sudo
rm -rf Documents Forcibly(-f) and recursively(-r) remove the folder Documents and all of its subfiles and subfolders
rmdir Documents remove the empty directory Documents
route print the routing table
scp <username@host>:<file to send> <file to receive> Secure Copy, transfer a file over ssh, file paths must be finitely defined. i.e. scp root@172.16.1.2:/root/.bashrc /root/.bashrc
service most often used to start, stop or restart a service. Typically executing scripts in /etc/init.d/
service --status-all print the up/down status of all services installed
service networking restart Ubuntu restart networking
shred removes a file and overwrites the data.
sl Choo Choo!
smbclient -L -U Administrator -W Home.local server1.home.local command line Samba client. In this context, used to list shares of the server "server1.home.local" with the username "Administrator" of the domain/workgroup "home.local"
source ~/.bashrc After editing you're .bashrc file, run this to update to the most current version
sudo ssh root@firewall.home.local -L 2222:172.16.1.2:22 Secure Shell: the -L requires root permissions, hence the sudo. In this scenario, I'm shelling into a remote router firewall.home.local. And from that firewall, I am accessing ssh on the remote server 172.16.1.2 and redirecting that to my local box on port 2222, thus creating a tunnel.
startx if X is installed at a terminal, start it.
stat <filename> print out statistics about a file, permissions, dates, owners, groups, etc
su <username> assume the role of another user, if username is not specified, become root
tail -f -n 25 /var/log/messages print just the tail of the file specified, in this case -f follows the file. And -n 25 specifies print out the last 25 lines
tar -zxvf file.tar.gz un gzip and un-tar, works on *.tar.gz and also *.tgz
telnet <host> <port> Telnet into the host and port specified, not that is a space seperating the two. Since telnet has been effectively replaced by ssh, this is most often used to determine if a given service is up such as smtp, vpn, or imap
top shows the top running processes
tracepath <hostname> analogous to traceroute in windows
uname -a print out the current kernel version
uname -a && cat /etc/*release print out the current kernel version and distibution details
users prints out the users currently logged in.
vim tmp2.txt VIM!
wget https://dl-ssl.google.com/linux/linux_signing_key.pub web get, requests and downloads the file specified
whereis sysinfo locate the binary source and manual page files for a command
who prints out the users currently logged in.
whoami prints out who you are logged in, props to Sam Flynn in Tron:Legacy for using this
whois waterone.org get whois info for the domain specified, I believe this queries the root servers
wireshark Packet sniffer, very useful if you specify narrow filters, overwhelming if you don't