Skip to content

Instantly share code, notes, and snippets.

View lmullen's full-sized avatar

Lincoln Mullen lmullen

View GitHub Profile
@lmullen
lmullen / configure-ubuntu.txt
Last active August 29, 2015 13:56
Configuring a new Ubuntu installation
# apt-get installs
sudo apt-get install synaptic
sudo apt-get install mercurial
sudo apt-get install libssl-dev
sudo apt-get install dconf-editor
sudo apt-get install pdftk
sudo apt-get install ubuntu-restricted-extras
sudo apt-get install gm-notify
sudo apt-get install unity-tweak-tool
@lmullen
lmullen / gitit-startup.sh
Last active August 29, 2015 13:56
An Ubuntu startup entry for Gitit; belongs in ~/.config/autostart/
#!/bin/sh
cd /home/lmullen/acad/research/wiki && /home/lmullen/.cabal/bin/gitit -f my.conf > /dev/null 2>&1 &
@lmullen
lmullen / Rakefile
Last active August 29, 2015 13:57
Convert geotiffs and rsync them to the server
tifs_to_project = FileList["*.tif"].exclude(/epsg3857/).ext(".epsg3857.tif")
desc "Reproject all geotiffs into EPSG:3857"
multitask :default => tifs_to_project
rule( /\.epsg3857\.tif$/ => [
proc {|task_name| task_name.sub(/\.epsg3857\.tif$/, '.tif') }
]) do |t|
system "gdalwarp -t_srs EPSG:3857 -s_srs EPSG:4326 #{t.source} #{t.name}"
end
@lmullen
lmullen / Rakefile
Last active August 29, 2015 13:57
Download the WPA Slave Narratives from the Library of Congress
desc "Download the WPA Slave Narratives using wget"
task :wget_wpa do
system %{wget --wait 1 --limit-rate=200k -A .jpg,.png,.gif,.txt,.tif,.pdf --no-parent --background --mirror http://memory.loc.gov/mss/mesn/}
end
@lmullen
lmullen / Rakefile
Last active August 29, 2015 13:57
Reproject geotiffs and upload them to a server
tifs_to_project = FileList["*.tif"].exclude(/epsg3857/).ext(".epsg3857.tif")
desc "Reproject all geotiffs into EPSG:3857"
multitask :default => tifs_to_project
rule( /\.epsg3857\.tif$/ => [
proc {|task_name| task_name.sub(/\.epsg3857\.tif$/, '.tif') }
]) do |t|
system "gdalwarp -t_srs EPSG:3857 -s_srs EPSG:4326 #{t.source} #{t.name}"
end
@lmullen
lmullen / pandoc-copy.vim
Created March 13, 2014 17:41
Convert pandoc buffer to HTML and copy to system clipboard
" Convert pandoc buffer to HTML and copy to system clipboard
autocmd FileType pandoc nnoremap <buffer> <C-S-x> :write \| let @+ = system("pandoc -t html " . shellescape(expand("%:p")))<CR>
@lmullen
lmullen / README.md
Last active August 29, 2015 13:57
Reusable Scatter Plot Function

Learning to create a reusable chart function for a scatter plot, following Mike Bostock's "Towards Reusable Charts." Also includes a random data generator.

@lmullen
lmullen / README.md
Last active August 29, 2015 13:57
Quicksort algorithm in R to demonstrate recursion
@lmullen
lmullen / README.md
Created March 26, 2014 00:01
Attribution function for R
@lmullen
lmullen / index.html
Last active August 29, 2015 13:57
Dissertation motivation
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/foundation/5.1.1/css/normalize.min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/foundation/5.1.1/css/foundation.min.css">
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<style>
p {
font-size: 18px;