Skip to content

Instantly share code, notes, and snippets.

View acrymble's full-sized avatar

Adam Crymble acrymble

  • London
View GitHub Profile
@acrymble
acrymble / wget active history
Created June 24, 2012 08:44
wget active history
wget http://activehistory.ca/papers/
@acrymble
acrymble / sudo wget
Created June 24, 2012 08:28
sudo wget
sudo make install
@acrymble
acrymble / wget make
Created June 24, 2012 08:27
wget make
make
@acrymble
acrymble / configure wget
Created June 24, 2012 08:25
configure wget
./configure –with-ssl=openssl
@acrymble
acrymble / cd wget-1.13
Created June 24, 2012 08:23
install wget
cd wget-1.13
@acrymble
acrymble / not installed linux
Created June 24, 2012 07:56
Linux not installed
-> command not found.
@acrymble
acrymble / missing url
Created June 24, 2012 07:55
Linux missing URL
-> Missing URL.
@acrymble
acrymble / nGransToKWICDict.py
Created June 14, 2012 11:48
nGramsToKWICDict.py
# Given a list of n-grams identify the index of the keyword.
def nGramsToKWICDict(ngrams):
keyindex = len(ngrams[0]) // 2
return keyindex
the age of wisdom it was the
@acrymble
acrymble / wrap-string-in-html.py
Created May 25, 2012 12:58
Wrap String in HTML Mac.py
# Given name of calling program, a url and a string to wrap,
# output string in html body with basic metadata and open in Firefox tab.
def wrapStringInHTML(program, url, body):
import datetime
from webbrowser import open_new_tab
now = datetime.datetime.today().strftime("%Y%m%d-%H%M%S")
filename = program + '.html'
f = open(filename,'w')
wrapper = """<html>