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
#Auto-upload screenshots to ImageShack.us and paste image URL to clipboard (Mac) | |
#!/bin/zsh | |
mkdir -p $HOME/Library/LaunchAgents | |
dir="$HOME/Library/Watchpics" | |
soundbegin="/System/Library/PrivateFrameworks/ScreenReader.framework/Versions/A/Resources/Sounds/DrawerOpening.aiff" | |
soundend="/System/Library/PrivateFrameworks/ScreenReader.framework/Versions/A/Resources/Sounds/DrawerClosing.aiff" | |
cat > $HOME/Library/LaunchAgents/watchpics.plist <<EOF | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
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
setInterval(function(){if($('.eliminate_timeout').length)$('.eliminate_timeout').trigger('click');}, 1000); |
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
<?php | |
// Run as a cron job every minute | |
set_time_limit(0); | |
$to = 'EricPKerr@gmail.com'; | |
$username = 'erickerr'; | |
$favorites_url = "http://api.twitter.com/1/favorites.json?screen_name=$username&count=20&include_entities=true&since_id="; | |
$timeline_url = "http://api.twitter.com/1/statuses/user_timeline.json?screen_name=$username&include_entities=true&since_id="; |
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
<?php | |
// Run as cron job every 1 minute | |
// Make sure INDEX_FILE is created with right permissions | |
set_time_limit(0); | |
define('EMAIL', 'you@gmail.com'); | |
define('USERNAME', 'erickerr'); | |
define('INDEX_FILE', 'favorite_tweets_index.txt'); |
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
<?php | |
// Run as cron job every 1 minute | |
// Make sure INDEX_FILE is created with right permissions | |
set_time_limit(0); | |
define('EMAIL', 'EricPKerr@gmail.com'); | |
define('USERNAME', 'erickerr'); | |
define('INDEX_FILE', 'favorite_tweets_index.txt'); | |
define('INDEX_SIZE', 100); // Store most recent tweet ids to account for tweets out of order |
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
<?php | |
$file = 'http://akcdn.okccdn.com/cbd/240/662551de/8c9027e29d0655d9/6x0/418x411/b58ced2c9e25c657413f.jpg'; | |
class ScrambledSquare { | |
var $top = array(); | |
var $left = array(); | |
var $right = array(); | |
var $bottom = array(); | |
} |
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
$recs = $spa_m->find('all', array( | |
'contain' => array( | |
'User' | |
), | |
'conditions' => array( | |
'SearchableProfileAttributes.gender' => 'Male', | |
'User.country' => 'United States' | |
) | |
)); |
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
import itertools | |
num = 1 | |
for x in ['taco','bell']: | |
for i in range(1, 4): | |
for y in set(itertools.permutations(['kentucky','fried','chicken'], i)): | |
print str(num) + ': ' + ' '.join(y) + ' '+ x | |
print str(num+1) + ': ' + x + ' ' + ' '.join(y) | |
num += 2 |
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
document.querySelector('[aria-label="Compose an email"]').click(); | |
var rows = document.querySelector('[data-message-id]').querySelectorAll('tr'); | |
console.log(rows); | |
var name = null; | |
var email = null; | |
var firstName = null; | |
var link = null; |