Skip to content

Instantly share code, notes, and snippets.

View kevana's full-sized avatar

Kevan Ahlquist kevana

View GitHub Profile
@kevana
kevana / MagDec.py
Last active September 28, 2023 15:53
Script to retrieve Magnetic declination data from www.ngdc.noaa.gov. Retrieves specified latitude and longitude ranges (CONUS by default) and stores them in a cfg style text file
#
# Script to retrieve magnetic declination data from www.ngdc.noaa.gov
# Retrieves specified latitude and longitude ranges (CONUS by default)
# and stores them in a cfg style text file
#
# Usage: Run script with no arguments, it will output declination.cfg
# in the current directory
#
# Tested with Python 3.3.1
#
@kevana
kevana / mmmmCookies.hbs
Last active May 28, 2019 10:30
Part of Nginx config for cookie-based routing.
if ($http_cookie ~* (
{{~#each cookies~}}
{{~ this }}{{#unless @last}}|{{/unless}}
{{~/each~}}
)=Y) {
rewrite ^{{ ocpUrl }}$ {{ bcpUrl }} redirect;
}
if ($http_cookie !~* (
{{~#each cookies~}}
{{~ this }}{{#unless @last}}|{{/unless}}
@kevana
kevana / classes.md
Last active August 4, 2017 14:12
UMN Unite CSCI courses, Spring 2016
Interest Course number Title
| CSCI 5105 | Introduction to Distributed Systems 
| CSCI 5106 | Programming Languages
| CSCI 5125 | Collaborative and Social Computing 
| CSCI 5161 | Introduction to Compilers
| CSCI 5221 | Foundations of Advanced Networking
| CSCI 5421 | Advanced Algorithms and Data Structures
| CSCI 5451 | Introduction to Parallel Computing: Architectures, Algorithms, and Programming

| CSCI 5461 | Functional Geometrics, Systems Biology and Bioinformatics

Recent situations such as Comcast throttling Netflix traffic during contract negotiations have made it very clear that better regulation is needed to prevent the internet from becoming a collection of private toll roads. In the past, startups have been able to access the same customers that Google, Amazon, and Facebook can. The startups had the same access to customers that large companies do and this efficient marketplace spurred innovation throughout the country.
Now, we are at an inflection point. Entrenched ISPs are starting to realize the rent-seeking potential of practices like zero-rating and pay-to-play bandwidth pricing. In the short term, these practices promise to maximize profits for a small number of ISPs. But in the long term these practices will harm countless other industries that rely on the internet as much as they rely on public roads, electricity, and other utilities. Ultimately, these practices will stifle innovation in America and place us at a competitive disadvantage to other parts
from __future__ import division
from xml.etree import ElementTree
from datetime import datetime
import requests
import Adafruit_WS2801
import dateutil.parser
import sys
@kevana
kevana / books.md
Last active October 13, 2016 05:30
Books I've already read
  • Laws of Simplicity
  • Designing for Emotion
  • The Age of the Platform
  • Design of Everyday Things
  • Release It!
  • Mythical Man Month
  • Peopleware
  • Inspired
  • Agile Project Management with Scrum
  • Distributed Systems, principles and paradigms
@kevana
kevana / modals.js
Last active May 27, 2016 22:44
API example for new modal manager
const viewModel = {
name: 'John',
credit: false,
}
const [openModal, closeModal] = modalManager.fire({ content: '#foo-tmpl', viewModel })
openModal
.then(() => console.log('modal opened'))
@kevana
kevana / create-machines.sh
Last active February 26, 2016 03:49
dvm + machine: Easy testing for apps that support multiple Docker versions
# create docker-machines and use dvm to switch client binaries.
docker-machine create \
--driver=virtualbox \
--virtualbox-boot2docker-url=https://github.com/boot2docker/boot2docker/releases/download/v1.10.2/boot2docker.iso \
1.10.2-dev
docker-machine create \
--driver=virtualbox \
--virtualbox-boot2docker-url=https://github.com/boot2docker/boot2docker/releases/download/v1.9.1/boot2docker.iso \
@kevana
kevana / stacktrace.txt
Last active December 17, 2015 23:41
asset-pipeline transform failure: ReferenceError: "babel" is not defined. (BabelProcessor.groovy#72)
java.lang.Exception: babel-transforming SearchBar.react.es6 failed: org.mozilla.javascript.EcmaError: ReferenceError: "babel" is not defined. (BabelProcessor.groovy#72)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_40]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_40]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_40]
at java.lang.reflect.Constructor.newInstance(Constructor.java:422) ~[na:1.8.0_40]
at org.springsource.loaded.ri.ReflectiveInterceptor.jlrConstructorNewInstance(ReflectiveInterceptor.java:1075) ~[springloaded-1.2.5.RELEASE.jar:1.2.5.RELEASE]
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:80) ~[groovy-2.4.5.jar:2.4.5]
at org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:74) ~[groovy-2.4.5.jar:2.4.5]
at org.codehaus.groovy.runtime.callsite.Constructor
14:47:35.041 [DEBUG] [TestEventLogger] java.lang.StackOverflowError
14:47:35.041 [DEBUG] [TestEventLogger] at java.util.concurrent.locks.ReentrantReadWriteLock$Sync.tryReleaseShared(ReentrantReadWriteLock.java:423)
14:47:35.042 [DEBUG] [TestEventLogger] at java.util.concurrent.locks.AbstractQueuedSynchronizer.releaseShared(AbstractQueuedSynchronizer.java:1341)
14:47:35.042 [DEBUG] [TestEventLogger] at java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.unlock(ReentrantReadWriteLock.java:881)
14:47:35.042 [DEBUG] [TestEventLogger] at org.grails.datastore.gorm.GormEnhancer.registerAssociationIdentifierGetter_closure4(GormEnhancer.groovy:320)