Skip to content

Instantly share code, notes, and snippets.

View PatTheSilent's full-sized avatar
:octocat:

Patryk D. Cichy PatTheSilent

:octocat:
View GitHub Profile
@ryandotsmith
ryandotsmith / a-backbone-js-demo-app-sinatra-backend.md
Created January 22, 2012 01:42
Backbone demo app with sinatra backend

A Backbone.js demo app (Sinatra Backend)

Oct 16 2010

Updates

  • 04/10/2011 - Updated application.js and application.rb thanks to @rebo's comments

In this article, I will walk through some simple steps to get a [demo app][2] up and running with [Backbone.js][3] and [Sinatra][4] on [Heroku][5].

@orls
orls / EnvDefault.py
Last active February 7, 2024 21:56
Using env vars in argparse
"""Provides a utility to inject environment variables into argparse definitions.
Currently requires explicit naming of env vars to check for"""
import argparse
import os
# Courtesy of http://stackoverflow.com/a/10551190 with env-var retrieval fixed
class EnvDefault(argparse.Action):
"""An argparse action class that auto-sets missing default values from env
vars. Defaults to requiring the argument."""