Skip to content

Instantly share code, notes, and snippets.

View micahbrich's full-sized avatar

Micah Rich micahbrich

View GitHub Profile
# to run: docker-compose run
#
# Create a .evn file in the same folder as this file and change the variables.
# MOUNT_POINT=/tmp/
# VPN_PROVIDER=changeme
# VPN_CONFIG=changeme
# VPN_USERNAME=changeme
# VPN_PASSWORD=changeme
#
#
@micahbrich
micahbrich / vhost
Last active November 3, 2015 19:16 — forked from asimpson/bash_function
This little script sets up a custom domain in MAMP and your hosts file.
#!/bin/bash
RED="\033[0;31m"
YELLOW="\033[33m"
REDBG="\033[0;41m"
BLACKBG="\033[0;40m"
WHITE="\033[1;37m"
NC="\033[0m"
mkdir -p /Applications/MAMP/Library/vhosts;
class Pitcher
attr_accessor :whip, :age
alias :whip_1 :whip
(2..20).each do |num|
define_method("whip_#{num}") do
if self.age < 28
eval("self.whip_#{num-1}") * 0.95
else
eval("self.whip_#{num-1}") * 1.05
@micahbrich
micahbrich / cloner.rb
Created July 3, 2011 17:38 — forked from cowboy/clone_fast.rb
League Cloner
# /usr/bin/env ruby
puts <<-EOF
LEAGUE CLONER via The League of Moveable Type
====================================================
EOF

Typekit Font Events

Web fonts may be the best thing to happen to web design in years, but that doesn't mean there aren't some tricky issues to overcome. One of the most annoying things is dealing with what's become known as the FOUT or 'Flash of Unstyled Text'. It's what happens in some browsers while waiting for fonts to download.

Typekit is introducing Font Events to put you back in control when using web

@micahbrich
micahbrich / generate_and_deploy_assets.rb
Created November 16, 2009 15:25 — forked from aeden/generate_and_deploy_assets.rb
capistrano recipe for moving public files to s3
desc "Generate and deploy assets"
task :deploy_assets, :roles => :app do
# get the previous timestamp
old_timestamp = File.read("config/deploy_timestamp").to_i rescue 0
# generate timestamp into config/deploy_timestamp
timestamp = Time.now.to_i
File.open("config/deploy_timestamp", 'w') do |f|
f.write(timestamp)
end