Skip to content

Instantly share code, notes, and snippets.

import logging
import os
import requests
logging.basicConfig(level=logging.DEBUG)
class DownloadSession(requests.Session):
buffer_size = 1024 * 1024
def __init__(self, user, password):
super(DownloadSession, self).__init__()
@3on
3on / gist:6593477
Created September 17, 2013 12:06 — forked from nananair/gist:6592828
tell application "Terminal"
activate
-- set profile buzz
tell me to set buzz to path to resource "dl.sh" as text
do script "cd ~/Downloads && bash " & quoted form of the POSIX path of buzz & " && say Buzz done"
-- close profile buzz window
end tell
@3on
3on / gist:2574358
Created May 2, 2012 06:16 — forked from vjeux/gist:2564679
Fullscreen Utilities
function canFullScreen() {
return document.body.webkitRequestFullScreen ||
document.body.requestFullScreen ||
document.body.mozRequestFullScreen;
}
function isFullScreen() {
return document.fullScreenElement ||
document.mozFullScreen ||