This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function pr (){ | |
args=("$@") | |
git_branch=$(git branch 2>/dev/null | sed -n '/^\*/s/^\* //p') | |
git pull-request ${args[0]} -b updtr:development -h updtr:$git_branch | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class JSONable(object): | |
""" Mixin for SQLObject classes. Allows you to export the object | |
as a JSON or dict representation, controlling the data returned | |
from the call. | |
You can either provide a list that enumerates the fields that | |
are visible (meaning that all not listed are hidden) or enumerating | |
fields that are hidden (meaning that all not listed are visible) | |
ex: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
APIBase | |
~~~~~~~~~~~~ | |
Defines APIBase which provides: | |
:meth:`clean_html`: removes all mark up from text | |
:meth:`send_status_code`: sends a response object and HTTP status code | |
:meth:`mk_msg`: formats a message for response | |
:meth:`ensure_json`: makes sure dict & list are converted to json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
# GNU General Public License for more details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (C) 2010 Todd Kennedy <[email protected]> | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($, _){ | |
var Region = function(el){ | |
this.el = el; | |
this.$el = $(el); | |
}; | |
_.extend(Region.prototype, { | |
show: function(view){ | |
// clean up... | |
this.clear(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="header"></div> | |
<div class="background vert_spacer"> | |
<div id="main"> | |
<div id="nav"></div> | |
<div id="workflow"> | |
<lift:bind name="page_title"><h1 id="page_title"></h1></lift:bind> | |
<div id="flash_message"></div> | |
<div id="verify_message"></div> | |
<div id="user_data"></div> | |
<div id="section"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MyBaseView = Backbone.View.extend({ | |
tpl_name: '', | |
render: function(){ | |
var dfd = $.Deferred(); | |
var template_context = this.model; | |
if(_.isUndefined(template_context) || _.isFunction(template_context)){ | |
template_context = new (Backbone.Model.extend({})); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
// get info about this page somehow | |
// this is, by the way, a dumb way to do this | |
$('head').append($(document.createElement('og:description')) | |
.html('This page kicks some major butt')); | |
}); |