Skip to content

Instantly share code, notes, and snippets.

View mambocab's full-sized avatar

Jim Witschey mambocab

  • Rapid7
  • Reston, VA
  • 21:59 (UTC -04:00)
View GitHub Profile
@dariusk
dariusk / autocharts.js
Created July 8, 2014 18:36
Code snippet from @autocharts with an explanation
// I search twitter for the following strings. I'm looking specifically for questions that start with
// 'do you' or 'are you', but do not contain certain key words.
_.when(
search('"do you" -what -why -who -where -which -when -how'),
search('"are you" -what -why -who -where -which -when -how')
)
.done(function(doYou,areYou) {
// I take the raw search results and I snip away
// the "do you" or "are you" and just grab the rest of the sentence. So "Are you a magician?" becomes
// "a magician". I collect a bunch of these. (I strip away "what" and similar, because "what are you
@sgerin
sgerin / gist:6265532
Created August 19, 2013 03:25
Get OS X icons. Thanks to Brett Terpstra.
# Adapted from Brett Terpstra script : http://brettterpstra.com/2013/04/28/instantly-grab-a-high-res-icon-for-any-ios-app/
# Fetches the 1024px version of an OS X app icon. The result is displayed in Pythonista's console, you can tap and hold to save or copy it.
# If you find any bug, you can find me @silouane20 on Twitter.
from PIL import Image
from StringIO import StringIO
import re
import requests
def find_icon(terms):