Skip to content

Instantly share code, notes, and snippets.

View eliheuer's full-sized avatar

Eli Heuer eliheuer

View GitHub Profile
@nbogie
nbogie / SimpleAesonJsonExample.hs
Created May 22, 2011 16:19
Simplest Aeson json parsing and generation example
{-# LANGUAGE OverloadedStrings #-}
-- This is a very simple example of parsing and generating json with Aeson,
-- by a haskell newbie and intended for newbies.
--
-- This almost certainly contains a number of bad practices. It works for
-- me and hopefully will get you started.
--
-- I couldn't find a stand-alone example of Aeson usage and found it tricky to
-- get going. For example, if you don't realize to enable the language extension
@mgedmin
mgedmin / show-all-256-colors.py
Last active August 24, 2023 16:23
Script to show all 256 colors supported by xterms
#!/usr/bin/python
"""Print a swatch using all 256 colors of 256-color-capable terminals."""
__author__ = "Marius Gedminas <marius@gedmin.as>"
__url__ = "https://gist.github.com/mgedmin/2762225"
__version__ = '2.0'
def hrun(start, width, padding=0):
@hirokai
hirokai / point.py
Created February 25, 2014 04:38
2D Point class in Python
from math import sqrt
class Point:
def __init__(self,x_init,y_init):
self.x = x_init
self.y = y_init
def shift(self, x, y):
self.x += x
@SuperDoxin
SuperDoxin / logo.py
Last active November 25, 2022 22:57
Python Logo using bezier curves and the turtle module
import turtle
import math
def lerp(a, b, t):
"""Linear interpolation function. returns a when t==0, returns b when t==1
and linearly interpolates for values inbetween"""
return (a * (1 - t)) + (b * t)
  • 🎨 when improving the format/structure of the code
  • 🚀 when improving performance
  • ✏️ when writing docs
  • 💡 new idea
  • 🚧 work in progress
  • ➕ when adding feature
  • ➖ when removing feature
  • 🔈 when adding logging
  • 🔇 when reducing logging
  • 🐛 when fixing a bug
@geddski
geddski / config.fish
Created October 3, 2014 19:42
useful fish config for git
##----GIT------
alias gs='clear ;and git status'
alias gb='git branch'
alias gbranch='git rev-parse --abbrev-ref HEAD' #get current branch name
alias gl="clear ;and git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
alias gt='git tag'
alias grm='git rm'
alias gps='git push'
alias gbi='git bisect'
alias gbg='git bisect good'
@darkyen
darkyen / gist:120c46739985ebf3b39b
Created June 10, 2015 03:40
Ferengi Rules of Acquisition [Complete List*]
1 "Once you have their money, you never give it back." "The Nagus" (DS9 episode)
2 "The best deal is the one that makes the most profit." The 34th Rule (DS9 novel)
3 "Never spend more for an acquisition than you have to." "The Maquis, Part II" (DS9 episode)
4 "A woman wearing clothes is like a man in the kitchen." The Ferengi Rules of Acquisition (DS9 novel)
5 "Always exaggerate your estimates." Cold Fusion (SCE novel)
6 "Never let family stand in the way of opportunity." "The Nagus" (DS9 episode)
7 "Always keep your ears open." "In the Hands of the Prophets" (DS9 episode)
8 "Small print leads to large risk." The Ferengi Rules of Acquisition (DS9 novel)
9 "Instinct, plus opportunity, equals profit." "The Storyteller" (DS9 episode)
10 "Greed is eternal." "Prophet Motive" (VOY episode)
@simoncozens
simoncozens / otvar-instance.py
Created September 27, 2016 10:04
OpenType Variation Instance Generator
#!/usr/bin/python
from fontTools.misc.py23 import *
from fontTools.ttLib import TTFont
import sys
import argparse
parser = argparse.ArgumentParser(description="OpenType Variation Instance Generator")
parser.add_argument('font', help="font file")
parser.add_argument('-a', '--all', action="store_true", help="Generate all instances")
parser.add_argument('-o', '--output', help="Output directory", default = ".")
@colinmahns
colinmahns / citibike.sh
Last active April 19, 2017 15:40
Quick, not optimized bash script to run in a cronjob at the end of the day. This will print the number of available bikes near a hard coded location and how many bike racks are available near New York's scenic Port Authority Bus Terminal.
#!/bin/bash
## Quick script to mention how many bikes are available near $EMPLOYER
## Will also show how many bike racks are available near PABT
## relies on curl and jq
## curl: https://curl.haxx.se/
## jq: https://stedolan.github.io/jq/
URL="https://feeds.citibikenyc.com/stations/stations.json"
JSON="/tmp/citibike.json"
@terabyte
terabyte / amazon.md
Created December 6, 2017 02:27
Amazon's Build System

Prologue

I wrote this answer on stackexchange, here: https://stackoverflow.com/posts/12597919/

It was wrongly deleted for containing "proprietary information" years later. I think that's bullshit so I am posting it here. Come at me.

The Question

Amazon is a SOA system with 100s of services (or so says Amazon Chief Technology Officer Werner Vogels). How do they handle build and release?