Skip to content

Instantly share code, notes, and snippets.

Lincoln Mullen lmullen

View GitHub Profile
@lmullen
lmullen / configure-ubuntu.txt
Last active Aug 29, 2015
Configuring a new Ubuntu installation
View configure-ubuntu.txt
# 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 Aug 29, 2015
An Ubuntu startup entry for Gitit; belongs in ~/.config/autostart/
View gitit-startup.sh
#!/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 Aug 29, 2015
Reproject geotiffs and upload them to a server
View Rakefile
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 Aug 29, 2015
Convert geotiffs and rsync them to the server
View Rakefile
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 Aug 29, 2015
Download the WPA Slave Narratives from the Library of Congress
View Rakefile
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 / pandoc-copy.vim
Created Mar 13, 2014
Convert pandoc buffer to HTML and copy to system clipboard
View pandoc-copy.vim
" 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 Aug 29, 2015
Reusable Scatter Plot Function
View README.md

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 Aug 29, 2015
Quicksort algorithm in R to demonstrate recursion
View README.md
@lmullen
lmullen / README.md
Created Mar 26, 2014
Attribution function for R
View README.md
@lmullen
lmullen / index.html
Last active Aug 29, 2015
Dissertation motivation
View index.html
<!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;
You can’t perform that action at this time.