Skip to content

Instantly share code, notes, and snippets.

View tofumatt's full-sized avatar

Matthew Riley MacPherson tofumatt

View GitHub Profile
@tofumatt
tofumatt / py-vs-ruby
Created October 18, 2011 17:08
py-vs-ruby
# Python:
from django.shortcuts import render
from django.http import HttpResponse
def about(request):
return render(request, 'landing/about.html')
@tofumatt
tofumatt / split.sh
Created November 1, 2011 23:32
split files
split -b500 ~/path/to/file.txt ~/path/to/split-
# The number after -b is the size in bytes.
(SELECT `id` FROM `profile` WHERE `user_id` IN (
SELECT `id` FROM `auth_user` WHERE `email` LIKE '%@mozilla.com' OR
'%@mozilla.org' OR
'%mozillafoundation.org'));
SELECT `id` FROM `group` WHERE `name` = 'staff'; // Get Staff
Index: lt/LC_MESSAGES/messages.po
===================================================================
--- lt/LC_MESSAGES/messages.po (revision 97169)
+++ lt/LC_MESSAGES/messages.po (working copy)
@@ -2,7 +2,7 @@
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-11-01 14:05-0700\n"
+"POT-Creation-Date: 2011-11-03 10:49-0700\n"
def test_profile_photo(self):
"""Make sure profile photo uploads and removals work.
Test the upload, encoding, and removal of photo profiles. Also make
sure edge cases (from naughty user input) and HTML elements work
properly.
"""
client = self.mozillian_client
# No photo exists by default, the delete photo form control shouldn't
Index: lt/LC_MESSAGES/messages.po
===================================================================
--- lt/LC_MESSAGES/messages.po (revision 98319)
+++ lt/LC_MESSAGES/messages.po (working copy)
@@ -2,7 +2,7 @@
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-12-01 08:28-0700\n"
+"POT-Creation-Date: 2011-12-01 13:19-0700\n"
Index: templates/LC_MESSAGES/messages.pot
===================================================================
--- templates/LC_MESSAGES/messages.pot (revision 98319)
+++ templates/LC_MESSAGES/messages.pot (working copy)
@@ -3,7 +3,7 @@
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-12-01 08:28-0700\n"
+"POT-Creation-Date: 2011-12-01 13:19-0700\n"
from django.contrib.auth.decorators import (login_required as
auth_login_required)
<video id="foo"
class="bar">
NOT
<video id="foo"
class="bar">
@tofumatt
tofumatt / denominations.json
Created September 13, 2012 22:45
I wonder what I'm working on?
{
"BRL": {
"coins": [
{
"0.01": "copper"
},
{
"0.05": "copper"
},