Skip to content

Instantly share code, notes, and snippets.

View idclark's full-sized avatar
💭
🪂

Ian Clark idclark

💭
🪂
View GitHub Profile
@idclark
idclark / zsh autopair
Created July 19, 2014 12:18
auto pair ' " ( { [
function autopair1() {
LBUFFER+="("
RBUFFER=")$RBUFFER"
}
zle -N autopair1 autopair1
bindkey "(" autopair1
function autopair2() {
LBUFFER+="{"
RBUFFER="}$RBUFFER"
@idclark
idclark / gist:3483866
Created August 26, 2012 22:07
.emacs
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(custom-enabled-themes (quote (tango-dark))))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
@idclark
idclark / gist:3261139
Created August 5, 2012 02:08
wget command for all images on page
wget -r -P /save/location -A jpeg,jpg,bmp,gif,png http://www.domain.com
@idclark
idclark / tag_free_content.py
Created July 22, 2012 01:04
Useful function to return text content free of HTML tags
from bs4 import BeautifulSoup
import urllib2
# choose a url
url = ' '
Soup = BeautifulSoup(urllib2.urlopen(url))
def get_tag_contents(tag_name):
content_list = []
$ cat rc.lua
-- Standard awesome library
require("awful")
require("awful.autofocus")
require("awful.rules")
-- Theme handling library
require("beautiful")
-- Notification library
require("naughty")
require("vicious")
@idclark
idclark / .Xresources.txt
Created June 1, 2012 20:46 — forked from anonymous/.Xresources.txt
.Xresources
!URxvt color scheme:
URxvt*background: #2B2B2B
URxvt*foreground: #DEDEDE
URxvt*colorUL: #86a2b0
!black
URxvt*color8: #414141
URxvt*color0: #353535
@idclark
idclark / Corpus.txt
Created May 1, 2012 21:05
Old English Corpus
` Genesis
Us is riht micel      ðæt we rodera weard,
wereda wuldorcining,      wordum herigen,
modum lufien!      He is mægna sped,
heafod ealra      heahgesceafta,
5
frea ælmihtig.      Næs him fruma æfre,
or geworden,      ne nu ende cymþ
ecean drihtnes,      ac he bið a rice
ofer heofenstolas.      Heagum þrymmum
@idclark
idclark / Marathon_scraper
Created January 5, 2012 01:44
scraping results pages from Chicago marathon.
rm(list=ls())
library(XML)
library(ggplot2)
library(reshape)
page_numbers <- 1:1430
weburl <- "http://results.public.chicagomarathon.com/2011/index.php?page=1&content=list&lang=EN&num_results=25&pid=list&search_sort_order=ASC&top_results=3&type=list"
@idclark
idclark / gist:1509126
Created December 22, 2011 05:53 — forked from sontek/snowjob.sh
Make your terminal snow
#!/bin/bash
LINES=$(tput lines)
COLUMNS=$(tput cols)
declare -A snowflakes
declare -A lastflakes
clear