html5 number field

By default, the HTML5 <input type="number"> field is a floating point value. I.e. 2.0 rather than 2. If you want a whole number (1, 2, 34, 230, e.t.c) you need to implement the step attribute along with the min attribute, like so: <input type="number" min="0" step="1">

Read More

Non greedy Regex

Turn a “greedy” regex into a non greedy one by using a question mark.

Read More

Git log with file list

Use git log --stat to show the log with the files that have changed (much like svn log -v)

Read More

Git ignore file change

Quite handy if you have a connections file you wish to ignore changes to a file

Read More

Shell Calendar

To see the current month, just type cal. To show a specific month type cal -m2 where 2 is the month number - in this case Fabuary. For a specific month of a specific year, type cal -d2014-02 where the -d param is yyyy-mm. To get the calendar for the full year, type cal 2015

Read More

Placerctrl Ubuntu 15.04

I’ve been using i3 as my default window manager recently and wanted a way to controll my music from my keyboard using the media buttons. Volume wasn’t a problem, but I wanted to use my pause, next, and prev keys as well. I found playerctl, which is a way to control your music from the command line

Read More

Hello World

Testing out jekyll blogging for no reason

Read More

subscribe via RSS