Skip to content

Instantly share code, notes, and snippets.

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;
@EricPKerr
EricPKerr / cookie-notice-zapper.js
Last active November 1, 2018 16:28
Website "We Use Cookies" Notice Zapper
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
$recs = $spa_m->find('all', array(
'contain' => array(
'User'
),
'conditions' => array(
'SearchableProfileAttributes.gender' => 'Male',
'User.country' => 'United States'
)
));
<?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();
}
@EricPKerr
EricPKerr / favorite_tweets.php
Created August 1, 2012 20:25
Email yourself Twitter favorites that have links
<?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
@EricPKerr
EricPKerr / gist:3229819
Created August 1, 2012 19:02
Email Yourself Twitter Favorites that have links
<?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');
@EricPKerr
EricPKerr / gist:3229480
Created August 1, 2012 18:21
Email Yourself Twitter Favorites that have links
<?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=";
@EricPKerr
EricPKerr / pandora_timeout_bypass.js
Created June 21, 2012 20:07
Bypass Pandora Hourly Timeout
setInterval(function(){if($('.eliminate_timeout').length)$('.eliminate_timeout').trigger('click');}, 1000);
@EricPKerr
EricPKerr / Watchpics
Created July 8, 2009 08:48 — forked from pc/Watchpics
Auto-upload screenshots to ImageShack.us and paste image URL to clipboard (Mac)
#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">