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
if has ("autocmd") | |
autocmd bufwritepost .vimrc source $MYVIMRC | |
endif |
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
// From http://stackoverflow.com/questions/3583989/jquery-autocomplete-pass-targeted-element-attribute-as-an-extra-parameter | |
$("#autocomplete input").each(function() { | |
var that = this; | |
$(that).autocomplete({ | |
source: function(request, response) { | |
$.ajax({ | |
url: "search.php", | |
dataType: "json", | |
data: { |
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
# With the following spec/spec.opts: | |
# --colour | |
# --format progress | |
# --format failing_examples:spec/spec_rerun.txt | |
# --loadby mtime | |
# --reverse | |
# | |
# You can use the following rake task: | |
# rake spec:rerun |
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
class AdvertsController < ActionController::Base | |
protect_from_forgery | |
# Non-adminny controller, delete the adverts.html.erb from app/view/layouts, it'll default to using | |
# application.html.erb | |
end | |
class AdminController < ActionController::Base | |
protect_from_forgery | |
before_filter :login_required |
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
#!/usr/bin/env ruby | |
# I named this file gem? and put it into my path. I'm sure that cuteness will blow up in | |
# my face at some point! | |
require 'rubygems' | |
require 'hpricot' | |
require 'open-uri' | |
require 'CGI' |
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
(function() { | |
var lighthouse_token = ''; | |
var base_url = "https://harmonypark.lighthouseapp.com"; | |
var ticket_url = prompt("Ticket url?"); | |
if (ticket_url === null) { | |
return; | |
} |
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
Mon, 5 Sep 2011 | |
Changes between 'ea776f90655ded3da3e1cf3b1f077b22b7ff0401' and HEAD | |
FEATURE: | |
- Hello world, now with added 3 | |
BUGFIX: | |
- Forgot to add version 2 | |
OTHER: |
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
I have a process for fixing bugs in tagged releases, but it always seems such a faff. This makes | |
me think I'm doing it wrong. So imagine this scenario: | |
- I tag a release (v1) and push it onto staging | |
- I continue work in master | |
- Client comes back with an issue on v1 | |
- I create a branch based off v1 | |
- I fix the bug | |
- ... |
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
on linkinuscmd(ipAddress) | |
set AppleScript's text item delimiters to "" | |
set iChatActive to false | |
set theString to "/me is not currently running iChat" | |
tell application "Finder" | |
if (get name of every process) contains "iChat" then set iChatActive to true | |
end tell | |
if iChatActive then |
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
require 'rubygems' | |
require 'mechanize' | |
require 'keychain' | |
class Scraper | |
def initialize(url) | |
@url = url | |
@flows = [] | |
end | |