Skip to content

Instantly share code, notes, and snippets.

View kevana's full-sized avatar

Kevan Ahlquist kevana

View GitHub Profile
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 / 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 / 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
@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 / 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

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)
@kevana
kevana / nginx-if.conf
Created November 30, 2015 18:57
Poor man's HTTPS redirect.
location /statement {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
proxy_set_header Connection "";
# Redirect to https if the protocol is http and the cookie is set
@kevana
kevana / bootstrap.js
Created November 23, 2015 23:46
Bootstrap JS 3.3.4 from our repo
/*!
* Bootstrap v3.3.4 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
if (typeof jQuery === 'undefined') {
throw new Error('Bootstrap\'s JavaScript requires jQuery')
}
# Case 1: If user is going to credit app from desktop prevent them from being redirected
# - User has cookie set
# - url is in active list.
# THEN prevent moovweb redirect
# Case 2: User is already on moovweb and goes to credit app page
# - Via header is set
# - User has cookie set
# - url is in active list