tips

Not Stupid SSH Tricks: Automatic ssh-add

less than 1 minute read

If you password protect your SSH keys (and you should) and you don’t store those passwords in your macOS keychain or Linux equivalent (slightly paranoid, but...

Sleepless Mac

1 minute read

Ever put your Mac to sleep only to come back find it’s still awake? This happens because something is telling the power management subsystem it can’t sleep y...

Grabbing SSH Keys from GitHub

1 minute read

A quickie this week. When I’m wearing my Ops Hat (I totally need to make me an “Ops Hat”, something with lights and a grappling hook), I often find myself se...

Better Whois

2 minute read

whois is a command line tool to look up registration information for domains, things like owner, location, and contact info. WHOIS (all caps) is a protocol f...

Secret Rails Configurations

2 minute read

Last time, I looked at keeping environment specific configuration using YAML files and Rails.application.config_for. One big issue with this approach is secu...

Custom Configuration for Rails Environments

3 minute read

Previously, I looked at the simply way of creating Rails stages that shared same configuration with Production by simply importing production.rb into the new...

Quick and Dirty Rails Environments

1 minute read

A quick tip — When I’m deploying Rails apps to Staging or Beta I try to keep the configuration as close to Production as possible. I’ve gotten bitten one too...

These Are the Inodes You Are Looking For

2 minute read

Ever gotten a disk full error, only to run df and not see any full disks? After banging you head against the wall for a while, you remember to run du -i and ...

The iOS Simulator 2016

1 minute read

An update to an older post about using the iOS Simulator from the command line.

Getting the ngrok URL

less than 1 minute read

A quick addendum to my previous ngrok post. If you are not using subdomains, it can be useful for your app to know what ngrok’s dynamically generated URL is....

Autostart ngrok with Rails

2 minute read

I’ve been using ngrok on quite a few projects lately. I’ve written about it before, but in short, it solves to problems for me.

How I Start Rails Projects

3 minute read

Everyone has their patterns, here’s mine for starting a new Rails project:

Cheap SSH VPN

2 minute read

Recently (I seem to start a lot of posts with “Recently”), I was on the road needed to access a server that was behind a firewall. There was no VPN and acces...

Dotfiles II: Choosing BASH Startup Files

3 minute read

A post or two back, I looked at having BASH detect if I was on my “desktop” (for lack of a better word) or a server and decided the best approach was to hard...

Sudo, Rsync, and Authentication Forwarding

2 minute read

rsync will happy copy files between servers and will keep the ownership and permissions the same. However, if you aren’t the owner of all of the files then o...

Invalidate CloudFront and Wait

2 minute read

In my occasional series on waiting for things, I setup a BASH function to wait for AWS CloudFront invalidations. I mentioned it would be possible to invalid ...

Fun with pushd

3 minute read

Here’s about as esoteric a post as I ever write, my love of pushd and it’s little abused directory stack. If you don’t live on the command line, move along, ...

BASH Autocompletion

3 minute read

A couple of posts back, I showed off some functions to pop up notifications when a host became pingable again or when a port became reachable. Today’s (semi)...

Is the Server Up Yet?

5 minute read

I hate waiting, but I have to do a lot of it. Waiting for servers to restart. Waiting for services to come up. Waiting around for a Yes or a No. To that end ...

Using Signals to Display Process Status

1 minute read

A couple of posts back, I wrote about how you can get status info out of a long running dd process by sending it a signal. The functionally is something you ...

Stupid ssh-add Tricks

2 minute read

If you are reading my blog, odd are you already know how to use ssh-add to manage you SSH keys. If not, you can read up on it.

UNIX User Management

1 minute read

This is one of the blog posts to set something in my mind that I’m always looking up. Linux has lovely tools for adding and managing users, but I can never r...

xargs

3 minute read

How to you take a list of files and do something with them in the UNIX shell? xargs is the key.

Arguments For Your Shell Aliases

2 minute read

I’ve touched on shell aliases and functions a few times, today I wanted to get in to a little more detail on passing arguments to them.

Web-Scale HTTP Tail

2 minute read

Previously while talking features of the HTTP Range header I wrote:

More Fun with the Range Header

1 minute read

In my previous post about codeless APIs I made use the HTTP Range header to download only a portion of the file from a web server or cache (byte serving).

Renaming Files

2 minute read

A quickie today, renaming a bunch of files in the shell. Unix gives you million ways to do it, here are a few that will help you understand your tools better.

Managing SSH Keys

1 minute read

To securely access your servers you use SSH keys. Passwords can be guessed, just look in your logs to see all the people trying. But, you know that. You’ve g...

iTerm Tear Off Tabs

2 minute read

I like iTerm 2 (and I can not lie). I use a Mac and spend most of my days in the terminal (and Emacs). When a window system first came into my life, it was X...

Backups With Rsync and launchd

3 minute read

Previously, I wrote about backing up files to Dropbox with rsync. I automated the process with cron the ancient UNIX “time-based job scheduler”. While OS X s...

Quick and Dirty Backups with rsync

2 minute read

One simple way to back up files is to copy them to Dropbox. However, manually copying files does not constitute a good backup, you’re going to forget.

Launchy

less than 1 minute read

In my last post about an alias that opened a URL from the command line, I said:

Open Github Repos From the Command Line

less than 1 minute read

If you’re ever sitting in a Git repository in the shell and want to view it on Github, here’s some quick laziness.

Open the iOS Simulator from the Command Line

1 minute read

When I need to test web apps on an iPhone or iPad, I use the iOS Simulator that ships with Xcode1. The Simulator is intended for developers testing native ap...

Laziness with Make

2 minute read

I have lots of shell aliases/functions for repetitive tasks. Copying files to and from servers, removing editor backup files, connecting to specific database...

Laziness: SCP Alias

less than 1 minute read

I often find myself needing to download files to my local box via SCP. Which means entering the hostname, the path, and the filename in to my terminal window...

Laziness: Remote SSH Usernames

less than 1 minute read

I’m lazy and I’m always looking for ways to avoid any unneeded typing. Here’s a little OpenSSH configuration tip that can save you up to 16 characters (if yo...