Skip to content

Instantly share code, notes, and snippets.

View terrycojones's full-sized avatar

Terry Jones terrycojones

View GitHub Profile
#!/usr/bin/env python
from json import dumps, loads
import sys
for line in sys.stdin:
print dumps(loads(line[:-1]), indent=4)
~/fluidinfo/src/fluidinfo.com (master) $ git fetch git@github.com:fluidinfo/fluidinfo.com.git obmaster:obmaster
From github.com:fluidinfo/fluidinfo.com
* [new branch] obmaster -> obmaster
~/fluidinfo/src/fluidinfo.com (master) $ git checkout obmaster
M fluidinfo/media/js/jquery-1.4.2.min.js
Switched to branch 'obmaster'
~/fluidinfo/src/fluidinfo.com (obmaster) $ git st
# On branch obmaster
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
$ git diff
warning: CRLF will be replaced by LF in fluidinfo/media/js/jquery-1.4.2.min.js.
diff --git a/fluidinfo/media/js/jquery-1.4.2.min.js b/fluidinfo/media/js/jquery-1.4.2.min.js
index 4e3dde0..9c2f5e3 100644
--- a/fluidinfo/media/js/jquery-1.4.2.min.js
+++ b/fluidinfo/media/js/jquery-1.4.2.min.js
@@ -1,16 +1,16 @@
-/*
-* jQuery JavaScript Library v1.4.2
-* Copyright 2010, John Resig, http://jquery.com/
#!/bin/sh
#PATH=/bin:/usr/ucb:/usr/bin
#
# usage: mytags [source-files]
# Enhanced version of ctags.
# Merge standard "ctags" and create extra tags from #define statements
# and declarations.
#
# Declaration cases not handled:
What I have often wanted was some semi-automated way to produce filters
written in C. That way, with some little language, one could produce a
filter, compile it and run it repeatedly. Not only that, adding to the
produced filter would be possible, since you would have the C code.
Plus it would run quickly. I wrote enough small filters do do
specialised little tasks to be sick of doing it, and so I wrote "filta"
to do the job.
The language of filta is currently very small. I'd go so far as to say
it's tiny. But I have found it very useful - which is more than I can
#!/bin/sh
myname="`basename $0`"
me=terry
identity=
case $# in
0) echo usage: "$myname" host; exit 1;;
*) host="$1";;
esac
def install_dependencies():
"""
Changes into the correct directory and pip installs the required packages.
"""
require('hosts', provided_by=[live])
<<<<<<< HEAD
run('cd %(path)s && bin/pip install -U -r requirements.txt' % env)
=======
# django
run('cd %(path)s; source bin/activate; pip install -U django==1.3' % env)
$ bin/test fluiddb/api/test/test_value.py
fluiddb.api.test.test_value
FacadeTagValueMixinIndexingTest
testDeleteTagIndexInTransaction ... WARNING:root:Retrying a transaction IMXKTZ due to HTTPRequestError(DNSLookupError("address 'none' not found: [Errno -5] No address associated with hostname",),)
ERROR:txsolr:DNS lookup failed: address 'none' not found: [Errno -5] No address associated with hostname.
WARNING:root:Retrying a transaction IMXKTZ due to HTTPRequestError(DNSLookupError("address 'none' not found: [Errno -5] No address associated with hostname",),)
ERROR:txsolr:DNS lookup failed: address 'none' not found: [Errno -5] No address associated with hostname.
WARNING:root:Retrying a transaction IMXKTZ due to HTTPRequestError(DNSLookupError("address 'none' not found: [Errno -5] No address associated with hostname",),)
ERROR:txsolr:DNS lookup failed: address 'none' not found: [Errno -5] No address associated with hostname.
[OK]
class FormTestClass(AccountsTestClass):
def test_ntoll(self):
data = {
'username': self.TEST_USERNAME + self.TEST_DOMAINNAME,
'name': self.TEST_NAME,
'email': self.TEST_EMAIL,
}
print 'now'
print 'data before test is', data
$ ./manage.py test accounts.FormTestClass.test_ntoll
Creating test database for alias 'default'...
now
data before test is {'username': '30db2a80-e979-4239-a52a-aeef8f655988oodl.es', 'name': 'name-30db2a80-e979-4239-a52a-aeef8f655988', 'email': '30db2a80-e979-4239-a52a-aeef8f655988@fluidinfo.com'}
init form data is {'username': '30db2a80-e979-4239-a52a-aeef8f655988oodl.es', 'name': 'name-30db2a80-e979-4239-a52a-aeef8f655988', 'email': '30db2a80-e979-4239-a52a-aeef8f655988@fluidinfo.com'}
{'_changed_data': None,
'_errors': {},
'auto_id': 'id_%s',
'cleaned_data': {'email': u'30db2a80-e979-4239-a52a-aeef8f655988@fluidinfo.com',
'name': u'name-30db2a80-e979-4239-a52a-aeef8f655988',