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
$user = "username" | |
url = "https://api.twitter.com/1/followers/ids.json?screen_name=#{$user}" | |
model User | |
- twitter_username | |
- twitter_auth_token | |
- timestamps | |
model FollowerList |
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 echo gdsrDatabase::get_post_data(get_the_ID())->views ?> Views |
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 (is404()) { | |
var uri = document.URL.split('?')[0]; | |
var domain = {wp: 'old.matchers.com', tumblr: 'www.mattdemers.com'}; | |
var wp_pages = "about|"; | |
var re_wp = new RegExp("^\/(page\/\d+|2\d{3}\/.+|)", "i"); | |
if re_wp.test(uri) | |
window.location.href= document.URL.replace(domain.wp, domain.tumblr); | |
} |
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 | |
function _mirror_page_parameters(){ | |
if (isset($_GET['page'])) { | |
$_GET['paged'] = $_GET['page']; | |
} elseif (isset($_GET['paged'])) { | |
$_GET['page'] = $_GET['paged']; | |
} | |
} | |
add_action('plugins_loaded', '_mirror_page_parameters'); |
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
jQuery.placeholder = function() { | |
var p='placeholder',s='['+p+']'; | |
$(s).live('focus',function() { | |
var input = $(this); | |
if (input.hasClass(p)) { | |
input.val('').removeClass(p); | |
} | |
}).live('blur', function() { | |
var input = $(this); | |
if (input.val() === '') { |
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
RegExp.escape = function(text) { | |
return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/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
[ | |
0, | |
[ | |
[ | |
"Toronto, ON, Canada", | |
null, | |
[ | |
"locality", | |
"political", | |
"geocode" |
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
mappings = { // table of character substitutions | |
'“': '"', | |
'—': '-', | |
'–': '-', | |
// etc | |
}; |
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 'pp' | |
data = [ | |
{"name" => "42nd Street","startDate" => 1334203200,"endDate" => 1351396800}, | |
{"name" => "A Word or Two","startDate" => 1343188800,"endDate" => 1345953600}, | |
{"name" => "The Best Brothers","startDate" => 1340683200,"endDate" => 1347768000}, | |
{"name" => "Cymbeline","startDate" => 1336622400,"endDate" => 1348977600}, | |
{"name" => "Elektra","startDate" => 1343534400,"endDate" => 1348891200}, | |
{"name" => "Hirsch","startDate" => 1340164800,"endDate" => 1347595200}, | |
{"name" => "MacHomer","startDate" => 1335931200,"endDate" => 1338004800}, |
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
noremap <c-tab> :tabnext<cr> | |
set expandtab | |
set smarttab | |
" enable line numbers | |
set number | |
setlocal numberwidth=5 | |
inoremap jj <Esc> | |
set softtabstop=2 | |
set shiftwidth=2 |