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
var doc = $(new DOMParser().parseFromString(response.responseText.replace(/\&taglist\=/g,'&taglist='), 'text/xml')); |
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 run {input, parameters} | |
repeat with i in input | |
tell application "MacVim" | |
open (POSIX path of i) | |
end tell | |
end repeat | |
tell application "MacVim" | |
activate | |
end tell | |
return input |
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 | |
########################################################################### | |
# Script to be called as an Xcode 4 behaviour which will attempt to | |
# uncrustify all source files in the open project. | |
# | |
# (c) Copyright 2012 David Wagner. | |
# | |
# Complain/commend: http://noiseandheat.com/ | |
# | |
#*************************************************************************# |
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
javascript:d=window.location.hostname.split('.');window.location='onepassword://search/'+((d.length>2)?d[1]:d[0]); |
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 | |
# -------------------------------------------------------------- | |
# iOSOpenDev -- iOS Open Development (http://www.iOSOpenDev.com) | |
# Copyright (C) 2012 Spencer W.S. James <dev@iosopendev.com> | |
# -------------------------------------------------------------- | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 2 of the License, or | |
# (at your option) any later version. |
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
diff --git a/background.js b/background.js | |
index f55a9ac..8e2160a 100644 | |
--- a/background.js | |
+++ b/background.js | |
@@ -295,6 +295,11 @@ | |
try_to_unwhitelist = function(url) { | |
url = url.replace(/#.*$/, ''); // Whitelist ignores anchors | |
var custom_filters = get_custom_filters_text().split('\n'); | |
+ var domain = parseUri(url).hostname.match(/[^.]+\.[^.]+$/); | |
+ custom_filters[0] += "|~" + domain; |
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 Catch < ActiveRecord::Base | |
belongs_to :animal, :polymorphic => true | |
end | |
class Bird < ActiveRecord::Base | |
attr_accessible :name | |
has_one :catch, :as => :animal | |
end | |
class Fish < ActiveRecord::Base |
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 'mongo_mapper' | |
map = %Q(function() { | |
lat_long = Math.floor(this.lat) + Math.floor(this.lon); | |
emit(lat_long, this.id); | |
}) | |
reduce = %Q(function(id, values) { | |
return vals; | |
}) | |
output_collection = "database.1by1" |
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
<?php | |
class Delegator { | |
private $obj; | |
public static function from($array) { | |
return array_map(function($obj) { | |
return new Delegator($obj); | |
}, $array); | |
} |
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
var metal = require('backbone-metal'); | |
metal.deprecate('test'); |
OlderNewer