Jonathon Scanes

two sides of the gun.

Read this first

Some of my fav unix/bash commands.

Awesome Bash shortcut I recently discovered allows you to quickly clear stuff from a bash command.

Ctrl + w

Clears the last block of text in a command.

Say you’ve got something like:

git commit -m "Added some things here and changed some other things over there."

That’s a terrible commit message, you should rewrite that. Issue Ctrl+w to get rid of the block of text to the left of the cursor.

Ctrl + r

Allows you to search through your recent commands. Issue Ctrl+r to open the query prompt, then simply enter your search.

Ctrl + l

Clears all the shit in the bash window, leaving you a fresh screen. Also works in some interpreter prompts too, in Python for example.

Ctrl + z

Ever started a long process without appending the ampersand &? For example,

$ mysql.server start

Well instead of killing the process with Ctrl + c, do Ctrl + z. It will throw that process into the...

Continue reading →


Unlimited Public WiFi

Trains in my city, like most have a free WiFi service. Here in Briz you get rough 5MB allowance. Which is great for a 20 minute trip but any longer is surely pushing it..

I’ve put a couple of commands in a shell script so you can just run it whenever you need a bit more juice. It Isn’t a major exploit by all means. Just simply awesome convenience.

Find it here

So next time you exceed the allowance, run some batshit.sh.

View →


Reverse proxy with nginx

I’ve got a dev machine at home that runs various dev tools such as Jira and Bamboo. Like all Atlassian products they run on various ports. This allows you to easily run their software, together, on the same machine.

There’s a few knit-picking issues with this though. The most obvious is that port numbers can be hard to remember. Bamboo runs on 8085 & Stash on 7090. Not what I’d call rememberable numbers given I had to double check. Secondly, if you want to access these services externally, you need to hack in the port forwarding records each time you add a new service.

Instead, use port 80 for all of your services and do the port forwarding internally, based off hostname. This removes the need to update your router each time you add a new service, as well as, everything runs on port 80, externally. When I wish to add a new tool to my workflow, I can simply configure the proxy...

Continue reading →