Skip to content

Instantly share code, notes, and snippets.

View KyleJamesWalker's full-sized avatar
😃
Hello!

Kyle James Walker (he/him) KyleJamesWalker

😃
Hello!
View GitHub Profile
@KyleJamesWalker
KyleJamesWalker / boot2docker-use-nfs.md
Last active August 29, 2015 14:22
Boot2Docker Please use NFS
@KyleJamesWalker
KyleJamesWalker / NestedDefaultDict.py
Last active January 4, 2016 05:09
Create a default dictionary n levels deep, with support for json.dumps() without the need for a special encoder.
import json
from collections import defaultdict
class NestedDefaultDict(defaultdict):
def __init__(self, depth, default=int, _root=True):
self.root = _root
self.depth = depth
if depth > 1:
@KyleJamesWalker
KyleJamesWalker / sublimesettings.md
Last active January 4, 2016 06:39
My Sublime Settings Files

Packages

  • BlockCursorEverywhere
  • Anaconda
  • Better CoffeeScript
  • CoffeeComplete Plus (Autocompletion)
  • Git
  • GitGutter
description "Hubot Slack bot"
# Slack-specific environment variables. Change these:
env HUBOT_SLACK_TOKEN=aaaaaaaaaaaaaaaaaaaaaaaaaa
env HUBOT_SLACK_TEAM=example
env HUBOT_SLACK_BOTNAME=flash_gordan
env HUBOT_AUTH_ADMIN=admin
# Subscribe to these upstart events
# This will make Hubot start on system boot
@KyleJamesWalker
KyleJamesWalker / multipart.py
Last active October 20, 2016 21:58
Simple Multipart CVS Writer / Multipart S3 Uploader Examples
import csv
import gzip
import sys
import humanfriendly
class MultipartCSVWriter:
def __init__(self, dest_format, fieldnames, max_size,
@KyleJamesWalker
KyleJamesWalker / DecoratedContextManager.py
Created October 30, 2016 17:58
Simple Example of a class with decorator support, context manager support
class DecoratedContextManager:
def __init__(self):
pass
def start(self):
"""Starts, for example opens file.
"""
pass
@KyleJamesWalker
KyleJamesWalker / simple_random_ytvideo.py
Last active December 9, 2016 00:23
Generates a random YouTube like Video ID
"""Generate a random YouTube like Video ID, supports deterministic generation
if seed is passed.
"""
import random
import string
import sys
YT_SET = (string.ascii_letters + string.digits + "-_") * 2
@KyleJamesWalker
KyleJamesWalker / fortune.py
Last active January 7, 2017 01:20
Generator that can tell the future based on a iterable object
'''Generator that can tell the future based on a iterable object
Update: Created a helper class to simplify the core generator code, left original to verify against.
'''
from collections import deque
class Bucket(object):
@KyleJamesWalker
KyleJamesWalker / _README.md
Created February 25, 2017 18:05
Convert directory of files with ffmpeg

Converts a directory of low bitrate mp4 audio files to window media audio with ffmpeg.

This is a quick conversion for my car's CD player as it doesn't support mp4.

Keybase proof

I hereby claim:

  • I am kylejameswalker on github.
  • I am kylejameswalker (https://keybase.io/kylejameswalker) on keybase.
  • I have a public key ASCW21fjaLLt721meHzL4foAVr3V44KfM0EX8cjlRUFDywo

To claim this, I am signing this object: