Skip to content

Instantly share code, notes, and snippets.

View benjaminfjones's full-sized avatar
🔬
trying to find scientist hat

Benjamin Jones benjaminfjones

🔬
trying to find scientist hat
View GitHub Profile
#!/usr/bin/python3 -u
#
# Copyright Dan Smith <dsmith+ustopo@danplanet.com>
#
# This downloads USGS topo GeoPDF maps in bulk, by default the current
# high-resolution 7.5-minute maps. For reference, all of Oregon comes to
# 96GB, all of Washington is 78G. For each state, the index will be downloaded
# into the root of the per-state directory, which is how you find which
# section map you need, by name.
#
#!/bin/zsh
# Many features, including GUI options have been turned off.
# The multibyte, perl, python(2/3), and ruby options have been
# enabled.
#
# This build is meant to be installed into a Stow directory
# and then the binaries and runtime are managed by the 'stow'
# tool.
#
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/") t)
(when (< emacs-major-version 24)
(add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")))
(package-initialize)
;; Make sure we can find executables installed in /usr/local/bin
(add-to-list 'exec-path "/usr/local/bin")
@benjaminfjones
benjaminfjones / brew_prof_need_libuuid.log
Created December 2, 2015 19:59
linux brew - installing profanity
2015-12-01 18:28:55 -0800
./configure
--disable-dependency-tracking
--disable-silent-rules
--prefix=/home/users/bjones/.linuxbrew/Cellar/profanity/0.4.7
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
@benjaminfjones
benjaminfjones / configure.log
Created November 13, 2015 19:30
(linux)brew install profanity - configure fail
2015-11-13 11:16:28 -0800
./configure
--disable-dependency-tracking
--disable-silent-rules
--prefix=/home/users/bjones/.linuxbrew/Cellar/profanity/0.4.7
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p

Keybase proof

I hereby claim:

  • I am benjaminfjones on github.
  • I am benjaminfjones (https://keybase.io/benjaminfjones) on keybase.
  • I have a public key whose fingerprint is 1D2B 4877 E846 97C3 9B4B 841F FF1A F2CE 3A82 939B

To claim this, I am signing this object:

@benjaminfjones
benjaminfjones / bootstrap.sh
Created July 1, 2015 22:55
Bootstrap NTL, GLPK, and Boost
#!/bin/bash
set -e
# prefix to install libraries to
: ${PREFIX:=/usr/local}
# Build ntl-6.2.1
wget http://www.shoup.net/ntl/ntl-6.2.1.tar.gz
tar xzf ntl-6.2.1.tar.gz
@benjaminfjones
benjaminfjones / archlinux-install.sh
Last active March 26, 2017 07:09 — forked from wuputah/archlinux-install.sh
arch linux quick-install script
#!/usr/bin/zsh
set +eux
# confirm you can access the internet
if [[ ! $(curl -Is http://www.google.com/ | head -n 1) =~ "200 OK" ]]; then
echo "Internet seems broken. Press Ctrl-C to abort or enter to continue."
read
fi
#!/usr/bin/env python3
#
# 2.76 seconds to execute
from functools import lru_cache
initial = \
[ 1
, 13
, 41
-- 4.00 seconds to execute main
module Main where
import Data.Vector (Vector, (!))
import qualified Data.Vector as V
n :: Int
n = 10000