This Gist has moved to a full git repo:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from ddtrace import tracer | |
@tracer.wrap() | |
def traced(): | |
return "Traced" | |
def not_traced(): | |
return "Not traced" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<title>Pixel test page</title> | |
</head> | |
<body> | |
<div id="nav"> | |
<a href="?black" style="color:black">black</a> | |
<a href="?white" style="color:white; background: gray">white</a> | |
<a href="?red" style="color:red">red</a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
class Foo | |
attr_reader :failed | |
def initialize | |
@failed = false | |
end | |
def [](foo, &block) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Remove stuff from the page to make github pages pretty for printing */ | |
console.log("Github pretty print 0.1"); | |
function removeClassElems(name) { | |
console.log("looking for class:", name); | |
Array.from(document.getElementsByClassName(name)).forEach(function(e) { | |
console.log("Removing", e); | |
e.parentNode.removeChild(e); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
alias π puts | |
class Aπ₯ | |
@@π΄ = { | |
π: 'Hello, world!', | |
π: 'HALP', | |
π₯: 'computer.', | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -eu | |
if [ $# -ne 3 ]; then | |
cat >&2 <<EOM | |
usage: $(basename "$0") YEAR MONTH {high|low|concat-only} | |
EOM | |
exit 1 | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Syncs Ruby binstubs for ruby-communal-gems. | |
# Run this everytime you install a new Ruby, or when you install a new gem | |
# with a bin/ command. (ie, when you typically do rbenv rehash) | |
# | |
# See: https://github.com/tpope/rbenv-communal-gems/issues/5 | |
# | |
set -eu |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import imaplib | |
import os | |
import logging | |
import optparse | |
# LABEL = 'support' | |
# QUERY = 'before:2015-06-01 -label:to-delete' | |
# DEST = 'to-delete' | |
LABEL = 'to-delete' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'openssl' | |
require 'socket' | |
METHODS = OpenSSL::SSL::SSLContext::METHODS.select {|m| (m.to_s =~ /_(client|server)$/).nil?} | |
PORT = 443 | |
HOST = ARGV[0] || 'qa.stripe.com' | |
IN_BUFFER = [] | |
OUT_BUFFER = [] |