Skip to content

Instantly share code, notes, and snippets.

@chbrown
chbrown / gist:1241156
Created September 25, 2011 21:09
LaTeX basic file
\usepackage{amssymb,amsmath,amsfonts}
\usepackage{fancyhdr,lastpage}
\usepackage{enumerate,soul}
\usepackage{gb4e}
% this forces footnotes to hit the bottom of the page, rather than the bottom of the text
\usepackage[bottom]{footmisc}
\usepackage[T1]{fontenc}
% margins
\topmargin=-0.5in
@chbrown
chbrown / gist:1241155
Created September 25, 2011 21:09
LaTeX basic file
\usepackage{amssymb,amsmath,amsfonts}
\usepackage{fancyhdr,lastpage}
\usepackage{enumerate,soul}
\usepackage{gb4e}
% this forces footnotes to hit the bottom of the page, rather than the bottom of the text
\usepackage[bottom]{footmisc}
\usepackage[T1]{fontenc}
% margins
\topmargin=-0.5in
@chbrown
chbrown / wait_list
Created July 1, 2011 00:11
Wait function for reading files async.
function wait(count, callback) {
return function() {
if (--count === 0) {
callback();
}
}
}
var list_of_files = ['a', 'b', 'c'];
var report = wait(list_of_files.length, function() {
UseCSSTransforms = false;
ShowPivots = false;
M = {
rotation : function(rotation) {
return CanvasSupport.tRotationMatrix(rotation)
},
scaling : function(x, y) {
return CanvasSupport.tScalingMatrix(x, y)
// Creating an array of objects.
Mover[] movers = new Mover[20];
void setup() {
size(200,200);
smooth();
background(255);
// Initializing all the elements of the array
for (int i = 0; i < movers.length; i++) {
movers[i] = new Mover();
#!/usr/bin/env ruby
require ENV['TM_SUPPORT_PATH'] + '/lib/ui'
lines = STDIN.readlines()
selected_text = ENV.member?("TM_SELECTED_TEXT")
block_top = 1
block_bottom = lines.length
def prepare(self):
if not self.value or not self.value['end_datetime']:
self.children.end_datetime.value = datetime.now() + timedelta(hours=1)
self.children.program_owners.options = DBSession.query(ProgramOwner.program_owner_id, ProgramOwner.name).all()
self.children.venues.options = DBSession.query(Venue.venue_id, Venue.name).all()
self.children.users.options = [(u.user_id, u.fullname) for u in DBSession.query(User)]
# THIS PART -v
validatables = [self.children.program_owners, self.children.venues, self.children.users]
======================================================================
ERROR: mvp.testdemo.tests.test_model.test_school.TestSchoolPeriodStudentCount.test_exception_when_creating_duplicate
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/chbrown/work/mvp21/lib/python2.6/site-packages/nose-0.11.1-py2.6.egg/nose/case.py", line 367, in tearDown
try_run(self.inst, ('teardown', 'tearDown'))
File "/Users/chbrown/work/mvp21/lib/python2.6/site-packages/nose-0.11.1-py2.6.egg/nose/util.py", line 487, in try_run
return func()
File "/Users/chbrown/work/mvp21/mvp2.1/mvp.testdemo/mvp/testdemo/tests/test_model/test_school.py", line 152, in teardown
self.session.commit()
<h1>Resource</h1>
${tab_nav()}
<div id="content">
<div class="header-with-controls">
<h1>Resources <!-- filter / whatever goes inside the h1 --></h1>
</div>
<ol class="controls">
<li><!-- whatever control --></li>
<!-- more controls -->
</ol>
#441 - 1 hr -
#445 - 20 hr - Large (new module). Need to discuss extensively before diving in.
#577 - 2 hr - 1/2 done. Other half will be quick.
#556 - XX hr - This needs a lot of explanation. Is the whole stats system going to be user configurable. This could be a huge ordeal in that case.
#422 - 2 hr - In place, need configurable settings to get around in tests / sites that don't want it.
#439 - 4 hr
#456 - 2 hr - Just like staff position checking but on a different model. Easy. Low priority -- I resurrected the ticket from a dontfix.