Skip to content

Instantly share code, notes, and snippets.

View tullyhansen's full-sized avatar

Tully Hansen tullyhansen

View GitHub Profile
@beaugunderson
beaugunderson / bot-ally-code-of-conduct.md
Last active August 29, 2015 14:10
#botally code of conduct

#botally code of conduct

based on the #nodejs code of conduct by @izs

tl;dr If you’re a mean butt you get kicked out. This is not negotiable.

  • Sexist, heteronormative, racist, and other offensive remarks are not allowed. (Cursing is allowed, but never targeting another user, and never in a hateful or sexually explicit manner.)
  • Remarks that make any of the ops go “Hm, that’s inappropriate”, whether on the above list or not: also not allowed.
  • You get a warning.
  • If the warning is not taken seriously, you might get a second sterner warning in PM, if you’re lucky, and the op is feeling generous, and this is the first time. But don’t count on that.
@coleww
coleww / gist:870d22d05ad57633b635
Created July 28, 2015 04:03
108 one word tweets that i found in like maybe an hour of letting "statuses/sample" run
Goodnight
back
CRISH
BOOFED
Hungry
affss
test294
yonkers
Squadd
Honestly
@minikomi
minikomi / slackurlscrape.py
Created September 8, 2014 03:26
get all urls mentioned in a slack channel for dump to txt
import requests
import json
import re
baseurl = "https://slack.com/api/channels.history"
token = "ur_token_plz"
channel = "C029WAA59"
urlregex = re.compile("<(http[s]{0,1}:\/\/.+?)>")
def scrapelinks(latest=""):
@swinton
swinton / echobot.py
Created September 24, 2012 15:21
Connect to Twitter, track a hashtag, read out the tweets
#!/usr/bin/env python
"""Connect to Twitter, track a hashtag, read out the tweets!"""
import sys
import subprocess
import multiprocessing
import track
@didlix
didlix / multimarkdown.patch
Created March 20, 2013 16:05
Jekyll patched to have multimarkdown support
diff --git a/lib/jekyll.rb b/lib/jekyll.rb
index b0401b9..26936e6 100644
--- a/lib/jekyll.rb
+++ b/lib/jekyll.rb
@@ -66,7 +66,7 @@ module Jekyll
'future' => true, # remove and make true just default
'pygments' => true, # remove and make true just default
- 'markdown' => 'maruku',
+ 'markdown' => 'multimarkdown',
@vivien
vivien / twitter.rb
Last active December 27, 2015 02:08
Fetch last few tweets, unauthenticated.
# Fetch last few tweets, unauthenticated.
#
# I just want the last few tweets of a user, I really don't want to do this:
# http://stackoverflow.com/a/15314662
require 'open-uri'
require 'cgi'
require 'openssl'
module Twitter
@dariusk
dariusk / README.md
Last active June 4, 2020 02:29
This lets you use the Wordnik API in Twine to get random nouns and adjectives. I didn't include verbs because conjugation sucks and I'm lazy.#TwineHacks

This Twine macro lets you use the Wordnik API to get random nouns and adjectives for your story.

See a demo in action here.

How to set it up

  • IMPORTANT FIRST STEP: you must have a Wordnik API key to use this! If you don't already have one, go here to register for an API key. If you do already have one, move on to the next step!
  • Paste the contents of the WordnikRandomWords.js file below into a new passage. Call the passage whatever you want, and add the tag "script" to it.
  • Modify the first line of the passage you just created so that instead of "var API_KEY = 'xxxxxxx'" you replace the x's with your actual API key you got from Wordnik.
@coryalder
coryalder / blogpost.md
Created August 17, 2011 07:37
Extract html book files from the safari books online iPad app "Safari To Go" using php.

Save books out of Safari Books Online

From http://objectivesea.tumblr.com/post/9033067018/safaribooks

This is hard. I spent way too much time figuring this out, because I was annoyed that a book I bought (Addison-Wesley) was available online for free, except only for 45 days after which payment was required. So I made this hack... probably useful to no one else, but here it is.

Requirements:

  1. iPad.
  2. Safari To Go (the Safari Books Online iPad app).
@rrrodrigo
rrrodrigo / instagram-download.txt
Created April 10, 2012 11:45
How to download all your Instagram pictures in highest resolution without using any API
Following the news about Facebook buying Instagram I decided to delete my Instagram account before Facebook claims ownership of my pictures.
Since the Instagram-recommended (in their FAQ): http://instaport.me/export doesn't work for me (probably they can't cope with the high demand),
here is a quick and dirty way to download all my Instagram pictures in their highest resolution in a few easy steps.
You will need: Firefox, Firebug, some text editor, wget
1. Go to http://statigr.am/yourlogin using Firefox with Firebug extension active
2. Scroll down as many times as it is needed to have all yor pictures thumbnails displayed (I had some 3 hundred pictures so it was not that much scrolling, YMMV)
3. In the Firebug JS console run this JS code: $(".lienPhotoGrid a img").each(function(index) { console.log($(this).attr('src')) })
4. JS console will contain urls to all the thumbnails images, like this: http://distilleryimage1.s3.amazonaws.com/4ed46cf2801511e1b9f1123138140926_5.jpg
@fabiofl
fabiofl / gist:5873100
Created June 27, 2013 00:41
Clear Mac OS X's icon cache.
sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \;