Skip to content

Instantly share code, notes, and snippets.

Matt McKellar-Spence MattMS

Block or report user

Report or block MattMS

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@MattMS
MattMS / Django fixtures edit.py
Last active Aug 29, 2015
Django fixtures from JSON
View Django fixtures edit.py
"""
Simple operations for editing JSON Django fixtures.
These functions may be useful as example code for manipulating a JSON
file so it plays nice as a Django fixture.
"""
import json
View keybase.md

Keybase proof

I hereby claim:

  • I am MattMS on github.
  • I am mattms (https://keybase.io/mattms) on keybase.
  • I have a public key whose fingerprint is CA2E 955C 7241 A555 F222 BC00 F4B6 A42B 4690 0CD9

To claim this, I am signing this object:

@MattMS
MattMS / PostgreSQL column names.sql
Last active Aug 29, 2015
Get column names from a PostgreSQL table
View PostgreSQL column names.sql
SELECT column_name FROM information_schema.columns WHERE table_name='my_table_name';
@MattMS
MattMS / _base.jade
Last active Aug 29, 2015
Jade base template with Markdown and CoffeeScript.
View _base.jade
doctype html
html(lang="en")
head
meta(charset="utf-8")
meta(http-equiv="X-UA-Compatible", content="IE=edge")
meta(name="viewport", content="width=device-width, initial-scale=1.0, user-scalable=no")
title This is Jade
body
block content
@MattMS
MattMS / Bootstrap 2 form.html
Last active Aug 29, 2015
Bootstrap 2 horizontal form
View Bootstrap 2 form.html
<form class="form-horizontal" method="post">
<div class="control-group">
<label class="control-label" for="email_inp">Email</label>
<div class="controls">
<input id="email_inp" name="email" placeholder="Email" type="text">
<span class="help-block">Please enter a valid email address.</span>
</div>
</div>
<div class="form-actions">
<button class="btn btn-primary" name="submit_btn" type="submit">Save changes</button>
@MattMS
MattMS / aliases.sh
Last active Mar 14, 2017
Aliases to make bash slightly less annoying
View aliases.sh
alias d='docker'
alias dc='docker-compose'
alias di='docker images'
alias gitb='git branch'
alias gitc='git checkout'
alias gitg='git pull'
alias gitp='git push'
alias gits='git status'
@MattMS
MattMS / Python packages.sh
Last active Aug 29, 2015
My commonly used Python packages
View Python packages.sh
pip install PyYAML
pip install requests
@MattMS
MattMS / Railo files.md
Created Mar 3, 2015
Notes on files used by Railo.
View Railo files.md

Railo files

tomcat/conf/server.xml

Seems to contain the main server configuration details.

@MattMS
MattMS / logging argparse.py
Last active Aug 29, 2015
Get logging level from argparse
View logging argparse.py
import argparse
import logging
logger = logging.getLogger(__name__)
kwargs = dict(level=logging.INFO)
if '__main__' == __name__:
parser = argparse.ArgumentParser(description='')
@MattMS
MattMS / HTML document ready.coffee
Last active Aug 29, 2015
HTML document ready event
View HTML document ready.coffee
document.addEventListener 'DOMContentLoaded', (event)->
You can’t perform that action at this time.