A quick handy wee snippet, if you wish to get a list of all files changed across two commits use the following syntax:
git diff --name-status $SHA1 $SHA2
Often I have a large SQL backup file I only need to extract a table and its information out of. To do this I’ve found that all you need to do is find the line you wish to delete up to and enter the following command.
This tells vim for the range 1 (line 1) to . (the current line), delete.
You can, of course, do something like:
But where’s the fun in that???
Tried on Ubuntu 15.04, you can create a .fonts folder in your home folder and chuck all your fonts in there. Just be sure to refresh the font cache.
cp yourfonts ~/.fonts
sudo fc-cache -f -v
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">
Turn a “greedy” regex into a non greedy one by using a question mark.
git log --stat to show the log with the files that have changed (much like
svn log -v)
Quite handy if you have a connections file you wish to ignore changes to a file
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
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
Testing out jekyll blogging for no reason
subscribe via RSS