Skip to content

Instantly share code, notes, and snippets.

View rgbkrk's full-sized avatar
🌎
Think globally, act locally

Kyle Kelley rgbkrk

🌎
Think globally, act locally
View GitHub Profile
@Kami
Kami / rackspace_new_sizes.py
Created November 5, 2013 08:02
Note: This code currently only works with Libcloud trunk.
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver
cls = get_driver(Provider.RACKSPACE)
driver = cls('username', 'api key', region='iad')
sizes = driver.list_sizes()
performance_sizes = [size for size in sizes if 'performance' in size.id]
@acfoltzer
acfoltzer / gist:7188179
Last active December 26, 2015 17:39
Haskell.org Committee Self-Nomination

Dear Committee,

I'm writing to nominate myself for a position on the haskell.org committee.

As a working Haskell developer at Galois, having reliable infrastructure is deeply important to me, and I would like to help maintain it however I can. I have experience maintaining web, mail, and IRC servers, as well as acquiring and configuring SSL certificates for those services. I hope that these skills may prove of use to the committee.

I also believe this is a critical point in the growth of our community. As adoption of Haskell increases, the decisions we make now will shape how our community develops, for good or for bad. I was moved by Chung-chieh Shan's [Haskell 2013 Program Chair report][1]. As he says, it can be hard work to speak one's mind with compassion, but let me try so that you can know better my concerns and what I hope to work towards.

I believe that a lack of diversity is one of the primary problems facing the Haskell community today. Ashe Dryden recently spoke at Galois and gave an excellent

@williamstein
williamstein / cloud-ipython.coffee
Created October 12, 2013 22:17
This is the code I wrote as part of https://cloud.sagemath.com in order to integrate IPython notebooks into my existing document synchronization infrastructure. It's CoffeeScript code that isn't meant to be run-able (I just copied it out of a bigger file). I just thought there could be some value in making this available under a BSD license, sin…
###############################################################################
# Copyright (c) 2013, William Stein
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright notice,
@dacamp
dacamp / fuzz
Created September 26, 2013 09:00
Obfuscated Fizz Buzz
#!/usr/bin/env ruby
# Fuzz you fizzbuzz
#
def method_missing(m, arg, &block)
[arg, m.to_s.split('_').select{|e|
(arg%(((e.to_s.bytes.
inject{ |sum, i| sum + i } % 15) / 3.0
).ceil + 2)).zero?
}.join()].join(' ')
[2013-07-23T22:15:28+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2013-07-23T22:15:28+00:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: python_pip[supervisor] (supervisor::default line 29) had
an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of pip install --upgrade supervisor ----
STDOUT: Could not find a version that satisfies the requirement supervisor in /usr/local/lib/python2.7/dist-packages (from version
s: 3.0b2, 3.0a9, 3.0a11, 3.0a8, 3.0a7, 3.0a10, 3.0a12, 3.0b2, 3.0b1)
Downloading/unpacking supervisor
Cleaning up...
No distributions matching the version for supervisor in /usr/local/lib/python2.7/dist-packages
Storing complete log in /home/ubuntu/.pip/pip.log
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active October 31, 2025 16:45
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@alecthomas
alecthomas / gist:4497119
Created January 9, 2013 21:28
*Very* hacky YAML + Salt structure validation.
import itertools
import functools
import fnmatch
import os
from StringIO import StringIO
import yaml
from yaml.parser import ParserError
import voluptuous as V
@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active August 25, 2025 12:52 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.
@mendelgusmao
mendelgusmao / gist:2356310
Created April 11, 2012 01:53
high performance URL shortener on steroids using nginx, redis and lua
# based on http://uberblo.gs/2011/06/high-performance-url-shortening-with-redis-backed-nginx
# using code from http://stackoverflow.com/questions/3554315/lua-base-converter
# "database scheme"
# database 0: id ~> url
# database 1: id ~> hits
# database 2: id ~> [{referer|user_agent}]
# database 3: id ~> hits (when id is not found)
# database 4: id ~> [{referer|user_agent}] (when id is not found)
# database 5: key "count" storing the number of shortened urls; the id is generated by (this number + 1) converted to base 62
# fabric extension to enable handling expected prompts
#
# Read more at http://ilogue.com/jasper/blog/fexpect--dealing-with-prompts-in-fabric-with-pexpect/
#
# This file Copyright (c) Jasper van den Bosch, ilogue, [email protected]
# Pexpect Copyright (c) 2012 Noah Spurrier ,see: http://www.noah.org/wiki/pexpect#License
from fabric.state import env
import fabric.api