This file contains 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
pandoc -t revealjs -s the-hard-thing-about-hard-things.md -o the-hard-thing-about-hard-things.html --template=reveal.html -V revealjs-url='../public/reveal.js' |
This file contains 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
M-: (byte-recompile-directory package-user-dir nil 'force) |
This file contains 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
sleep $1 | |
while true | |
do | |
sleep 1 | |
say "wake up" | |
done |
This file contains 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
function fetchcore() { | |
return $(echo $(git fetch core)) | |
} | |
function pulcore() { | |
if [[ -z fetchcore ]] then | |
local branch | |
if [[ $1 ]] then | |
branch=$1 | |
else |
This file contains 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 | |
echo $DB_HOST | |
echo $DB_USER | |
echo $DB_PASSWORD | |
databases=`mysql -h $DB_HOST -u $DB_USER -p$DB_PASSWORD -e "SHOW DATABASES;" | tr -d "| " | grep -v Database` | |
for db in $databases; do | |
if [[ "$db" != "information_schema" ]] && [[ "$db" != "performance_schema" ]] && [[ "$db" != "mysql" ]] && [[ "$db" != _* ]] ; then | |
echo "Dumping database: $db" |
This file contains 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
require 'celluloid/current' | |
class Cook | |
include Celluloid | |
def produce(manager) | |
manager.async.inform("produced") | |
end | |
end |
This file contains 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 sh | |
apt-get update && apt-get upgrade -y | |
apt-get install -y git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev | |
apt-get install -y libgdbm-dev libncurses5-dev automake libtool bison libffi-dev | |
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 | |
curl -sSL https://get.rvm.io | bash -s stable | |
source ~/.rvm/scripts/rvm | |
rvm install 2.3.1 |
This file contains 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
# -*- coding: utf-8 -*- | |
require 'uri' | |
require 'net/http' | |
require 'json' | |
require 'byebug' | |
require 'pp' | |
def request(url) | |
req ||= Net::HTTP::Post.new url |
This file contains 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
{ | |
"libs": [ | |
], | |
"plugins" : { | |
"node" : { | |
} | |
}, | |
"ecmaVersion": 6 | |
} |
This file contains 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
import os.path, re | |
filename = os.path.expanduser("~/.ssh/config") | |
hosts = [] | |
file = open(filename, 'rb') | |
contents = file.read() | |
for line in contents.split('\n\n'): | |
m = re.search('[Hh]ost\s+(?P<host_name>\w+)', line) | |
if m is not None: |
OlderNewer