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 / bot.py
Created March 24, 2014 08:54
A quick and dirty script that monitors reddit's newest comments and searches for a particular substring in each comment.
# New comment monitor for reddit
#
# Copyright (C) 2014 Kevan Ahlquist
#
import requests
import json
import pprint
from time import sleep
@kevana
kevana / sudokuSolver.scm
Created March 27, 2014 04:17
A throwback from my first semester in college.
(#%require racket/date)
;KEVAN AHLQUIST
;first test list
(define test '((9 . 3)(4 . 5)
(3 . 10)(2 . 13)(1 . 14)(9 . 18)
(1 . 20)(6 . 22)(9 . 24)
(6 . 28)(2 . 30)(9 . 34)(3 . 35)
(7 . 37)(9 . 41)(8 . 44)
(1 . 46)(4 . 48)(6 . 52)(7 . 53)
@kevana
kevana / DCI data.md
Last active August 29, 2015 14:02
This is the current progress of a project to compile corps and event information from Drum Corps International (DCI) for all years from 1972 to the present.

DCI event results!

@kevana
kevana / carriers_list.py
Created June 8, 2014 02:17
A python dictionary containing cell carrier email-to-SMS gateways
'''
Cell carrier email-to-SMS gateway information.
Numbers should contain no dashes or other punctuation.
Country codes may be required for some carriers.
example address format:
'5551112222@message.alltel.com'
This list was originally from the github.com/brendanlim/sms-fu project.
@kevana
kevana / something.md
Last active August 29, 2015 14:06
What I'm up to

What am I doing?

If we haven't caught up in a while, this is what I'm up to these days:

Working

I am a Software Engineer at Bluestem Brands (Fingerhut, eCommerce). I started with the web self service product team, we work on user experiences like applying for credit, tracking orders, and scheduling payments. Now I've moved to the shop team, where we integrate recommendation engines as well as add features to search and product pages. I moonlight with the platform team using Docker to ease test environment pain.

I'm also doing some contract work with Xylo, a startup that's making a service to manage the daily activities of music programs. We are using my peculiar combination of music knowledge and software skills to enhance the experience for program directors and students.

String extractExpirationYear(String cardExpiration) {
String year = cardExpiration == null || cardExpiration.length() != 6 ? "" : cardExpiration.substring(2, 6);
if ("".equals(year)) {
year = cardExpiration == null || cardExpiration.length() != 4 ? "" : "20" + cardExpiration.substring(2, 4);
}
return year;
}
@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 / Dockerfile
Last active August 29, 2015 14:22
One of the first Dockerfiles we wrote, don't do this.
FROM ubuntu:14.04
MAINTAINER ***********
#Update package respository
RUN echo "deb http://dk.archive.ubuntu.com/ubuntu/ precise-security main universe" >> /etc/apt/sources.list
RUN apt-get update
RUN apt-get install -y python-software-properties
RUN apt-get install -y software-properties-common
RUN add-apt-repository -y ppa:webupd8team/java
docker run -d -p 9000:9000 -v /var/run/docker.sock:/docker.sock --name dockerui dockerui -e /docker.sock
c8267fd57f1cfa180c86d53ae229bc57e2a76cdff978726c3a287a340cd92f9b
Error response from daemon: Cannot start container c8267fd57f1cfa180c86d53ae229bc57e2a76cdff978726c3a287a340cd92f9b: failed sandbox add: failed to add interface veth1c3efdc to sandbox: failed in prefunc: failed to get link by name "veth1c3efdc": Link not found
make: *** [run] Error 1