How to Boot Up Multiple Sinatra Applications at the Same Time with Foreman
Foreman is a process management gem for ruby applications. It is used in combination with a Procfile for configuration instructions.
A typical Procfile looks something like this
[name] : [script to execute]
Example Rack application Procfile
...
Written by Sean Behan on 10/15/2013
Pretty Formatted JSON from the Command Line
Sometimes you want to see JSON from the command line. I'm sure there are better tools for the job, but here is a little snippet you can throw in your ~/.bash_profile.
function json { curl -s "$1" | python -mjson.tool; }
Usage
json https://g...
Written by Sean Behan on 08/21/2013
Backup and Rotate MySQL Databases Simple Bash Script
Make a directory ( it can anywhere ) called baks/mysql
mkdir -p /baks/mysql
Create a file (it can be anywhere) called /root/mysql_backups.sh and put this script in it
#!/bin/bash
# modify the following to suit your environment
export DB...
Written by Sean Behan on 05/16/2017
How to Copy and Paste to/from the Global Register with Tmux on Mac OS X
Using the system clipboard with tmux on OS X is broken. I really like tmux but having copy and paste is kind of important for me. Here is my attempt to get it back with a simple bash script until I find something better. The approach is to take a named pi...
Written by Sean Behan on 06/17/2012
Updating Your Twitter Status with cURL and a Bash Function
I'm usually at the command line so I wrote a little a bash function so that i can type
tweet this is really neat but kind of pointless
and it will update my twitter status! some characters trip it up but in general it's useful for most of my tweets. The...
Written by Sean Behan on 06/17/2012