SSH ProxyCommand with Netcat

SSH ProxyCommand with Netcat I found myself looking at articles regarding SSH ProxyCommand’s this week. For work, I needed to SSH to one machine, change user, and then SSH to another machine. There are a number of useful articles that give commands to make this kind of thing work. I’ll go through a couple of the commands mentioned in those articles, describe what they do, and then dig a little deeper into how they do it....

November 10, 2016

Using strace

In my [last post][1], I discussed what a file descriptor is and ran some commands to interact with the file descriptors associated with a shell process. In this post, I’ll look at how to use the strace tool to inspect the file activity of a process. History When using a new tool, I find it worthwhile to read about how the tool came about. strace has a [wikipedia page][2] that tells us it is a “system call tracer” (hence the name s-trace) originally written for SunOS by Paul Kranenburg (1991)....

November 3, 2016

What's a file descriptor?

Getting out of the Comfort Zone When I [started this blog][1], I decided I wanted to do deep dives on topics in order to provide value. I have realized that by asking questions about things I use everyday can lead to all sorts of new knowledge if I stretch past my comfort zone. Digging deep enough to get to the bottom of a topic takes work, but the stuff you find on the way has some serious staying power....

October 26, 2016

How does cron work?

TL;DR The cron utility is a daemon that wakes up every minute to check if needs to run a job. The Story of Cron I found myself wondering recently how cron works (cron is a utility for scheduling tasks on Linux. For a good intro on how to use it, see this blog post). Is cron doing something fancy to schedule these tasks? Or is it just constantly checking if it has something to do?...

September 13, 2016

Solving a File Format Mystery

TL;DR The file command line utility is really useful if you’re not sure what format a file is. For example: $ file IMGP0175.JPG IMGP0175.JPG: MPEG sequence, v2, program multiplex A Mystery Photo Format I recently received an email from my grandpa. He found an old DVD with pictures from my brother’s graduation, but he could not open some of the files. I asked if he would send a few of them my way so I could take a crack at figuring out what was wrong with them....

September 10, 2016

What is __init__.py? and what should I put in it?

What is __init__.py? A Google search leads to stackoverflow which links to the python documentation. The gist is that __init__.py is used to indicate that a directory is a python package. (A quick note about packages vs. modules from the python docs: “From a file system perspective, packages are directories and modules are files.”). If we want a folder to be considered a python package, we need to include a __init__....

September 6, 2016

What's In A .deb

I recently installed Debian on my MacBookAir (see my [last post][mba-linux-post] for details). As a part of that exercise, I touched some .deb files which got me wondering, what’s in a .deb file? The .deb File Format Wikipedia tells us: Debian packages are standard Unix ar archives that include two tar archives optionally compressed with gzip (zlib), Bzip2, lzma, or xz (lzma2): one archive holds the control information and another contains the program data....

August 28, 2016

Installing Linux on a MacBook Air

Background After successfully repairing my 2011 MacBook Air (see my [last post][lastpost]), I had a decision to make: update to the latest OS X meant for beefier hardware, or install a lighter weight Linux operating system. Having seen a co-worker’s older MacBook Air bite the dust on the latest OS X version, and lacking any Linux in my life, I decided to start down the Linux trail. Picking A Distribution I settled on Debian as my distribution....

August 25, 2016

Fixing a MacBook Air After a Spill

TL;DR I spilled on my laptop, and decided to fix it. I found a step-by-step guide, the tools required, and the replacement part (and later a cheaper option). The replacement was a success, cost $280 and took about 2 hours. Background About 2 years ago, I spilled beer all over my laptop (a mid 2011 MacBook Air 13"). Soon after, the keyboard starting acting funny. Pressing some of the keys felt a crunchy, pushing one key would register as pushing several, and other keys would not register at all....

August 21, 2016

Starting Out

In order to decide what kind of blog I wanted to make, I turned to some of my favorite blogs: Wait But Why colah.github.io What If? They all share a common theme. The author has learned something and creates a post to share that knowledge. In Wait But Why, Tim Urban describes his process like this: The way I approach a post like that is I’ll start with the surface of the topic and ask myself what I don’t fully get—I look for those foggy spots in the story where when someone mentions it or it comes up in an article I’m reading, my mind kind of glazes over with a combination of “ugh it’s that icky term again nah go away” and “ew the adults are saying that adult thing again and I’m seven so I don’t actually understand what they’re talking about....

May 9, 2016