This file contains 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
# Allow pseudo long options based on naming convention. | |
# Long opts are converted to short opts by simply discarding all but | |
# the first character, which does nothing more than allow for more | |
# readable argument lists. | |
set -- `echo " $@ " | sed s/\ "-\{1,\}\([a-zA-Z]\)[-a-z]\{1,\}[=\ ]/\ -\1\ /g"` |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE keyboard PUBLIC "" "file://localhost/System/Library/DTDs/KeyboardLayout.dtd"> | |
<!-- | |
* save to ~/Library/Keyboard Layouts/BritishWithHash.keylayout | |
* enable as input source within keyboard preferences | |
* select as input source in menu bar | |
NOTE: although this works in Lion, it messes up the press and hold for alternative characters feature. | |
--> | |
<!-- Fri, 24 Feb 2006 Generated from KCHR: "British" --> | |
<!--Last edited by Ukelele version 2.1.7 on 2011-09-07 at 14:20 (BST)--> |
This file contains 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
git tag -d 12345 | |
git push origin :refs/tags/12345 |
This file contains 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
git describe --tags --match "v*" 2> /dev/null | sed s/-/+build./ | sed s/-/./ |
This file contains 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
module PgSearch | |
module ClassMethods | |
def rebuild_pg_search_documents | |
self.find_each {|record| record.update_pg_search_document} | |
end | |
end | |
class Document | |
before_validation do | |
self.meta = generate_meta |
This file contains 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
# Make formtastic's cancel action return the user to the original referrer | |
# | |
# By default, the cancel action in formtastic always goes to the previous | |
# page, so hitting cancel after validation failures returns the user to | |
# the form, not the original referring page. The code below modifies the | |
# cancel action such that it by default returns to the original referrer. | |
# It does so by simply keeping track of the referrer in a hidden field. | |
# | |
# See also https://github.com/justinfrench/formtastic/issues/780 |
This file contains 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 | |
# Burns a rekordbox export to an MP3 CD compatible with older CDJs. | |
# | |
# Copies mp3, m4a and wav audio files from export volume to a single CD, | |
# converting to constant bit rate mp3 compatible with older CDJs and other | |
# non-pioneer CD players as required. | |
# | |
# Will explode if files won't fit onto a single CD. Yup, I know this is shit. | |
# |
This file contains 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
# Taken from Jamis Buck's post "The road to faster tests" | |
# http://37signals.com/svn/posts/2742-the-road-to-faster-tests | |
# | |
# Disabling GC and running the collector manually every few seconds | |
# knocks 25-30% off the time taken to run all of my non-js scenarios | |
# on ruby 1.9.3p448, without any other memory management tuning. | |
DEFERRED_GC_THRESHOLD = (ENV['CUCUMBER_DEFERRED_GC_THRESHOLD'] || 3.0).to_f | |
last_gc_run = Time.now |
This file contains 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 | |
# Experimental script to fix fscked wordpress permissions, needs testing | |
usage() { | |
echo "Usage: $0 [-u user] path-to-wordpress-install" | |
} | |
# allow user to be set via command line option | |
while getopts “u:v” OPTION |
This file contains 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
" Vim color file | |
" Maintainer: Mark Woods | |
" Licence: Public Domain | |
" GUI only color scheme based on the eclipse color scheme, optimised for ruby. | |
set background=light | |
highlight clear | |
if exists("syntax_on") |