Skip to content

Instantly share code, notes, and snippets.

View davidthewatson's full-sized avatar

david watson davidthewatson

View GitHub Profile
@davidthewatson
davidthewatson / fabfile.py
Created June 29, 2011 21:32
This is a copy of my current fabric configuration
from fabric.api import env, put, run, sudo
from fabric.contrib.files import upload_template
env.hosts = ['host1', 'host2']
env.password = 'your_password'
def upgrade():
run('apt-get update && apt-get -y upgrade')
reboot()
@davidthewatson
davidthewatson / gist:1447245
Created December 8, 2011 15:14
this is a test
This is a test.
@davidthewatson
davidthewatson / gist:1447389
Created December 8, 2011 15:51
This is the description.

This is the content.

@davidthewatson
davidthewatson / gist:1449507
Created December 9, 2011 00:38
python: set attributes in class given key value pairs
class a():
def set_attrs_in_class_given_key_value_pairs(**kwargs):
for k,v in kwargs.iteritems():
setattr(self, k, v)
@davidthewatson
davidthewatson / this_is_a_test.html
Created December 11, 2011 22:37
This is a test.
This is <i>only</i> a test.
With an extra file.
@davidthewatson
davidthewatson / markdown_example.md
Created December 12, 2011 06:45
Markdown Example

An h1 header

Paragraphs are separated by a blank line.

2nd paragraph. Italic, bold, monospace. Itemized lists look like:

  • this one
  • that one
@davidthewatson
davidthewatson / the_new_blog_software_flask_plus_gist_equals_flasgist.html
Created December 13, 2011 14:39
The New Blog Software: Flask + Gist = flasgist
<p>I'm not sure if anyone's been crazy enough to try this yet, but I've had this vision for a while. I had three main goals: get the data out of a relational database, put it in the cloud, and make it look pretty.</p>
<p><b>I satisfied the first goal using github's gist API as a data store for all of my blog posts.</b> I use the description as the title, the filename to anchor the URL semantically, the created_at date for the date/time of the posting, and the body for the post itself. I'm only supporting single filename gists right now, and I use the starred/unstarred functionality to mean published and draft, respectively. The beauty of this design is that it allows me to avoid having to implement all of the CMS functions directly, i.e authentication, creating, updating, deleting posts, etc. In exchange, I use github's gist interface for creation, updating, deleting, promoting from draft to published, and in turn, I get versioning and forking of posts for free, which is inline with both my share and share-al
@davidthewatson
davidthewatson / david_watson_architect.html
Created December 17, 2011 21:47
David Watson - Architect
<p>If I ever wind up with a giant pile of money, <a href="http://watsonarchitect.com/">this guy is going to be my architect</a>.</p>
@davidthewatson
davidthewatson / black_dub_at_guitar_center_doing_surely.html
Created December 18, 2011 16:50
Black Dub at Guitar Center doing Surely
<p><iframe width="940" height="705" src="http://www.youtube.com/embed/qG5AZIRMvRo" frameborder="0" allowfullscreen></iframe></p>