Skip to content

Instantly share code, notes, and snippets.

Banana Bread

Ingredients

  • 1/2 butter
  • 1 c. sugar
  • 2 eggs
  • 3 smashed bananas
  • 2 c. flour - whole grain or white spelt is best
  • 1 tsp. baking soda

Uploading Boxes to Atlas via Curl

First, you'll need to get an access token.

Then, prepare the upload:

curl 'https://atlas.hashicorp.com/api/v1/box/USERNAME/BOX_NAME/version/VERSION/provider/PROVIDER_NAME/upload?access_token=ACCESS_TOKEN'
@pearkes
pearkes / gist:1621910
Created January 16, 2012 17:27
One-line static site on Heroku
touch index.php; echo 'php_flag engine off' > .htaccess; git init; heroku create -s cedar; git add -A && git commit -m "initial"; git push heroku master;
@pearkes
pearkes / app.py
Created February 19, 2012 16:35
Using url_for() to separate static paths on dev/prod with Flask
...
STATIC_PATH=str(os.environ.get("STATIC_PATH"))
@app.route(STATIC_PATH, build_only=True)
def static_path():
pass
...
@pearkes
pearkes / VagrantFile
Created March 17, 2012 23:31
Foreman-Ready Vagrant Box with Provisioner. Precise64 and Ruby 1.9.3.
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "precise64"
# The url from where the 'config.vm.box' box will be fetched if it
# doesn't already exist on the user's system.
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
@pearkes
pearkes / gist:2209293
Created March 26, 2012 20:07
one line lint install for Sublime
$ git clone git://github.com/lunixbochs/sublimelint.git ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/sublimelint/
@pearkes
pearkes / gist:2403889
Created April 17, 2012 06:26
Google Weather Conditions
<!--
Google Weather API Conditions. Compiled by Dennis Delimarsky
-->
<!-- Last updated: March 12, 2010 -->
<conditions>
<type>PARTLY SUNNY</type>
<type>SCATTERED THUNDERSTORMS</type>
<type>SHOWERS</type>
<type>SCATTERED SHOWERS</type>
<type>RAIN AND SNOW</type>
@pearkes
pearkes / git-completion.bash
Created July 27, 2012 16:20
git-completion.bash
#!bash
#
# bash/zsh completion support for core Git.
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).
# Distributed under the GNU General Public License, version 2.0.
#
# The contained completion routines provide support for completing:
#
@pearkes
pearkes / gist:4069203
Created November 13, 2012 23:45
My shell prompt, with Vagrant and Git status.
# Example: http://s.jack.ly/iXhJ
prompt() {
PS1="${GREEN}\W\$(parse_git_branch) $BROWN\$(parse_vm_state) ${GREEN}→ ${GREY}"
PS2="\[[33;1m\]continue \[[0m[1m\]> "
}
parse_git_branch() {
#!/usr/bin/env bash
# Run as root (sorry mom) like this: curl http://gist/test.sh | sed 's/defaulthost/pablo/g' | sudo sh
# This basically turns on ssh and sets a new hostname.
scutil --set HostName defaulthost
echo "Succesfully changed hostname to `hostname`"
echo "Enabling SSH access.."
systemsetup -setremotelogin on