Content from 2015

By devin, 23 December, 2015

(Prepared to be shared at my work: www.uniqueway.com 😎)

Through long trial and error, and with a healthy dose of help from the Linux from Scratch website, I've accumulated some good knowledge of Bash in my time with Linux and OS/X. Here are the highlights:

By devin, 16 December, 2015

Sometimes you make a git commit, but there's a typo or syntax error in there by accident. I normally use git rebase -i HEAD~2 and then through the magic of vim I'm fairly productive at squashing the two commits together.

But wouldn't it be nice if there was a way to run one command to squash your most recent commit (which probably has a useless message like "typo" anyway) into the next most recent? Lucky for you, there is now!

By devin, 24 November, 2015

The other day my computer begain repeatedly giving me this MySQL error:

Your password has expired. To log in you must change it using a client that supports expired passwords.

It happened to my root account and my Devin account. I searched online quickly and found out (after more looking than I'd hoped for) how to change my password.... but the problem came back a few days later.

By devin, 5 November, 2015

I've been working on a major schema refactor on a rails application recently, and time and again I've had to reset my database because of some syntax error or another in my migrations. I'm changing schemas and moving data between columns, which makes the migrations really fragile.

It's also been fun learning about the rake tools that allow you to manage database migrations. In particular, three rails commands have come in handy:

By devin, 27 October, 2015

I have a website with a two-level dropdown menu (it's not this one!). I want it to be slick, so I used CSS to only show the submenus when the user was hovering on the relevant parent menu item. This was great, until I realized people liked to access my website from their phones. The only way to reveal the submenus using a touch screen is to click the top menu item, but that will activate the link and change the page before you can find the link you want.

By devin, 22 October, 2015

Whenever I use openvpn I'm stuck carting around 5 files, sending them over Bluetooth and cluttering up my phone's downloads directory or confusing people I'm setting up with openvpn

I decided finally to figure out inline openvpn client config files (note: all-in-one files don't work on the Securepoint SSL windows client). I made this sed script/command that will automate the process. Imagine that the following five correctly configured openvpn files are in my current directory, with the openvpn file referencing the others:

By devin, 7 September, 2015

Here are the commands I use for ssh port forwards. If you add the -N flag it *won't* open an ssh session, but that's almost aesthetic. Imagine I'm running all of these from my laptop.