Skip to content

Instantly share code, notes, and snippets.

View aidansteele's full-sized avatar
🏠
Working from home

Aidan Steele aidansteele

🏠
Working from home
View GitHub Profile
# gem install guard
# gem install guard-shell
# guard - watch the Magic™
guard 'shell', :elixirc_bin => "/usr/local/elixirc" do
watch(/(.+\.ex$)/) { |m| `elixirc #{m[0]}` }
end
guard 'shell', :elixir_bin => "/usr/local/elixir" do
watch(/(.+\.exs)/) { |m| `elixir #{m[0]}` }
end
@aidansteele
aidansteele / quote_generator_main.py
Created September 17, 2012 00:47 — forked from ngopal/quote_generator_main.py
the main program for the quote generator web app example (built with Flask)
from flask import Flask, url_for, render_template, g, redirect
import random
import sqlite3
DATABASE = 'quotes.db'
app = Flask(__name__)
def connect_db():
return sqlite3.connect(DATABASE)