This blog was created as a storehouse for the random bits of information that I am always trying to pack away and recover later. Mostly it is intended to hold the simple recipes and instructions for doing basic tasks that I can never remember, don't want to look up again, and would like to have available. If you find the information useful, that's great. If you feel the need to comment, correct, or augment the info--even better!
Wednesday, June 15, 2016
Some data tools
There are some good command line data tools in this blog post for working with data. Specifically, csvkit is pretty useful.
Wednesday, May 11, 2016
Figuring out which internet connection is being used
Now that fiber connections are more widely available (including in my house) sometimes I will plug my laptop in to a wired connection so that I can take advantage of the higher speeds. For general browsing and listening to music it doesn't make much difference whether I am on wifi or wired in, but when transferring large amounts of data, it can make a big difference. But when I plug in the wired connection, do I need to disconnect my wifi to ensure I am using the connection? How do I tell which connection is being used? The answer is found with the Linux tools route and traceroute.
Monday, April 4, 2016
Viewing login attempts
Open an ssh port to the internet and in a short time you will see all kinds of login attempts. There will be repeated attempts to access your system using usernames such as "admin" and "root" and others that are presumably left unguarded on systems somewhere. There are all kinds of simple steps to take to ensure that these attempts are not successful and that they don't overwhelm your system (such as using fail2ban). The log files auth.log and syslog (found in /var/log) will be full of attempts, but how do you look to see if anyone has successfully logged in?
Wednesday, February 24, 2016
Running Python pip on a specific python installation
Python versions are a bit confused on my Ubuntu install right now. If I type "python" at the command line I get Python 2.7. If I type python3 then I get Python 3.4. And python3.5 gives me Python 3.5. Not usually a problem because I put the correct entry in the shebang of the script I am running, but it is sometimes difficult to get pip to install in the right place (or, I should say, to figure out where pip installed and determine if it is where I want it, because who knows what the "right" place is?).
Wednesday, November 18, 2015
Useful Byobu Commands
Using the terminal in Linux is a must, but sometimes it is a little restricting (especially when logged in over an SSH session). Screen has been a longtime solution for these limitations, providing a terminal user some simple commands to switch among terminal sessions and easily keep sessions running in the background, but recently I have been using Byobu instead. Byobu is built on Screen as well as another solution called tmux.
Thursday, September 10, 2015
Purging old kernels to make room on /boot
I've installed Linux on lots of laptops and desktops by now, and like most people I succumbed to the desire to make some custom decisions on how the system should be configured. One of the most basic decisions is the layout of the system across multiple partitions. There are some technical advantages to having a separate /boot partition, but (especially with Ubuntu, which is what I use) the /boot partition eventually fills up with old kernels and you are unable to perform the standard software updates because the drive doesn't have enough free space. There are a number of recommended ways to clear out these old kernels, but most involve lots of scripting or command line magic. Oddly, there is not a one-button solution within the software updater, where it would be incredibly convenient. But there is a simple command from the bikeshed package to handle this problem.
Wednesday, February 18, 2015
Using DB2 from Python
I have been searching on and off for several years to try and find a simple way to use Python for DB2 queries. Connecting to DB2 from Java is fairly simple--or at least straightforward, because nothing in Java is really that simple--but I have had trouble finding the information and steps for actually making Python speak to DB2. I have finally found the right combination of ingredients for the sauce, though, and it turns out to be extremely simple.
Thursday, October 16, 2014
Ignoring Files in Subversion
Most of our project files were originally designed around Eclipse and the IntelliJ project files keep showing up when I do an SVN status. Not a huge deal...it is fairly easy to just ignore them. But I got tired of seeing them and couldn't remember how to make Subversion ignore them. Online info for dealing with Subversion is generally great, but everything I found on this process was a bit confusing so I wanted to put it all together here.
Tuesday, August 12, 2014
Federal Place Name Codes
First there were FIPS codes. Then they became INCITS codes, but they are still FIPS codes. Frankly, I don't know what to call them, so I will continue to refer to them as FIPS codes until too many people correct me. INCITS sounds a little dirty if you pronounce it out in certain ways.
For a little history, read this. For some federal (possibly international) standard codes on places in the us such as counties, cities, metropolitan statistical areas (MSAs), and voting districts, as well as to find links to stuff like standardized spellings for all kinds of geographic entities, just go here.
For a little history, read this. For some federal (possibly international) standard codes on places in the us such as counties, cities, metropolitan statistical areas (MSAs), and voting districts, as well as to find links to stuff like standardized spellings for all kinds of geographic entities, just go here.
Sunday, June 15, 2014
Converting Video for Use on iPod Nano
I wanted to leave my kids some video messages on their iPods for camp (7th generation Nano devices). I did this last year using the Photobooth app on the Mac and just loaded them into iTunes and there was no problem. Naturally this did not work again. Linux to the rescue, however.
Subscribe to:
Posts (Atom)