Skip to content

Instantly share code, notes, and snippets.

View tullyhansen's full-sized avatar

Tully Hansen tullyhansen

View GitHub Profile
@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).
@benspaulding
benspaulding / ReadMe.rst
Created October 16, 2011 04:33
Intelligently rename active document in BBEdit.

BBEdit Rename Active Document Script

The script itself has most of the documentation. Just know that there are two scripts here:

  1. A plain-text version (.applescript)
  2. A compiled version (.scpt)
@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
@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
@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.
@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',
@yanofsky
yanofsky / LICENSE
Last active October 17, 2024 22:49
A script to download all of a user's tweets into a csv
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@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 {} \;
@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
@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=""):