Skip to content

Instantly share code, notes, and snippets.

View davidthewatson's full-sized avatar

Dave davidthewatson

View GitHub Profile
@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
With an extra file.
@davidthewatson
davidthewatson / this_is_a_test.html
Created December 11, 2011 22:37
This is a test.
This is <i>only</i> a test.
@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 / gist:1447389
Created December 8, 2011 15:51
This is the description.

This is the content.

@davidthewatson
davidthewatson / gist:1447245
Created December 8, 2011 15:14
this is a test
This is a test.
@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()