This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage: | |
# | |
# (Note - This command does not recursively traverse subdirectories!) | |
# | |
# * Save the script to a directory that is in your PATH variable so it can be executed | |
# * chmod u+x path/to/sort_dir # so that it can be executed | |
# * cd into the directory containing the files who's contents you wish to sort | |
# * Simpy run the command 'sort_dir' | |
# * This will product an subdirectory called 'sorted' containing all the current | |
# directory's files with their contents sorted |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aptitude install vim-gnome | |
The following NEW packages will be installed: | |
libruby1.8{a} vim-gnome |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage | |
# (Note: This command does not handle spaces in filenames!) | |
# * cd into the directory containing the files and subdirectories of files in | |
# which you wish to carry out string substitution using a regex | |
# * Run the command: | |
# rsub 'search regex' 'replacement text' | |
# * This will effect the desired substitution in files in the current directory | |
# and in any subdirectories | |
# Explaination |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Note: Best Janus practice is to drop these into ~/.vimrc.before rather than ~/.vimrc itself | |
set tabstop=4 | |
set shiftwidth=4 | |
set softtabstop=4 | |
autocmd User Rails/**/* set tabstop=4 | |
autocmd User Rails/**/* set shiftwidth=4 | |
autocmd User Rails/**/* set softtabstop=4 | |
# P.S. Thanks to http://www.savagevines.com/post/2011/8/14/overriding_indentation_settings_for_vimrails for shining light on this area |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
It's been a while since the last blog post (almost becoming an annual publication) and I'm in the process of moving theirishpenguin.com - hence this gist - but I felt inspired to write about an amazing event coming up this month, now that we've hit August. It's SpreeConf Europe, it's happening in Dublin and it has a star-studded lineup from round the world! | |
It kicks of on the 22nd of August in the Guinness Storehouse (http://www.guinness-storehouse.com) and lasts for two fabulous days of tech talk that cover a range of topics, that will appeal to a general developer audience. Talks featuring Javascript, Backbone, Rails as well as e-commerce will be to the fore. As will, of course, Spree Commerce itself which, over the last year and a half, has grown to be one of the most prominent Open Source projects on Github. Now, onto some of the headline acts... | |
Yehuda Katz - Ruby on Rails and jQuery core team member delivers the keynote | |
Gregg Pollack - of Ruby5 podcast and Code School fame | |
Ryan Bigg - Author of 'Rail |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This is a wrapped up version of the instructions at | |
# http://code.google.com/p/irssi-libnotify/wiki/MainPage for ubuntu | |
# | |
# Usage: Just run this script from the command line with no arguments | |
# | |
# Tested on Ubuntu 12.04.1 (64 bit) | |
echo "" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
require 'json' | |
unless ARGV.length == 1 | |
puts " | |
Usage: prettify_json.rb path/to/file.json | |
It's simple! It is strongly recommended that you redirect any errors to an | |
error.txt file (to make them easy to read) as follows... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A short summary of the day; starts early, around 8.30, there are 6 or | |
7 iterations of 45 minutes each, trying to solve Conway's Game of Life | |
(http://en.wikipedia.org/wiki/Conway's_Game_of_Life). All iterations | |
are in pairs (one computer), and the language is chosen by the pair. | |
At the end of the 45 minutes you have to DELETE all your code, stand | |
up for a 5 minutes group retrospective (in which we ask uncomfortable | |
questions if no one speaks up), and then a 10 minute break to grab | |
some coffee and find a new partner for the next iteration. Each | |
iteration will have some additional rules (things like, no if | |
statements allowed, or applying 'tell don't ask', depending on the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Based on the dd test script at https://wiki.archlinux.org/index.php/SSD_Benchmarking | |
# Disclaimer: Use at your own risk. This program comes with no warranty. | |
if [ "$(id -u)" != "0" ]; then | |
echo "This script must be run as root" 1>&2 # in order for the drop_caches command to work | |
exit 1 | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('div.site div.container')[1].style.width='95%';var div=$('div#js-repo-pjax-container')[0];div.style.width='95%'; |