Skip to content

Instantly share code, notes, and snippets.

John Louis Del Rosario john2x

Block or report user

Report or block john2x

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
john2x / bclose.vim
Created Aug 24, 2013
Delete buffer while keeping window layout (don't close buffer's windows) Version 2008-11-18 from
View bclose.vim
" Delete buffer while keeping window layout (don't close buffer's windows).
" Version 2008-11-18 from
if v:version < 700 || exists('loaded_bclose') || &cp
let loaded_bclose = 1
if !exists('bclose_multiple')
let bclose_multiple = 1
john2x /
Last active Dec 18, 2015
markdown test

Collabspot Highrise Changelog


New fetures

  • Foo
  • Bar

Bug fixes

  • fix for quux
john2x /
Last active Dec 17, 2015
inspired by Clojure's get-in function
def getin(d, keys, default=None):
>>> d = {'foo': {'bar': {'baz': 1}}}
>>> getin(d, ['foo', 'bar', 'baz'])
>>> getin(d, ['foo', 'bar'])
{'baz': 1}
>>> getin(d, ['foo', 'oops'], default=0)
import webapp2
from google.appengine.api import urlfetch
class MainPage(webapp2.RequestHandler):
def get(self):
self.response.headers["Content-Type"] = "text/plain"
app = webapp2.WSGIApplication(
john2x / gist:3871758
Created Oct 11, 2012
xero 2-legged oauth
View gist:3871758
function test() {
var requestURL = "",
timestamp = (new Date().valueOf()/1000).toFixed(0),
nonce = createGuid(),
key = "consumer key from xero private app",
publickey = "content of publickey.cer",
requestData = {
"method": "GET",
"contentType": "application/xml",
"headers": {
View openerp-requirements.txt
# openERP requirements
# $ apt-get install libldap2-dev libsasl2-dev
# $ apt-get install python-libxslt1 python-webdav
# $ virtualenv --system-site-packages /var/www/openerp/venv
# $ source /var/www/openerp/venv/bin/activate
# (venv)$ pip install -r openerp-requirements.txt
# install PIL
# $ sudo apt-get build-dep python-imaging
# $ sudo ln -s /usr/lib/`uname -i`-linux-gnu/ /usr/lib/
john2x / tshirt.css
Created Jun 20, 2011
reference for new theme
View tshirt.css
@import "reset.css";
background: url("grid.png") repeat-y;
font-family: helvetica, arial;
position: absolute;
right: 20px;
top: 85px;
font-size: 2em;
View gist:1031751
**RPSO - Sales Order Document
PARAMETERS lcFilter, lcDateRange, lcSortRange, lcAdvFilter, lcOtherVariable, lcSortOrder
***JDM--CR 80887--3/18/02--Need the following variables.
LOCAL lcSql, lcSql1, lcSql2, lcSql3, lcSql4, lcSql5, lcSql6, lcSql7, lcSql8, lcSql9
LOCAL lcSql0, lcSql11, lcSql12, lcSql13, lcSql14, lcSql15, lcSql16, lcSql17, lcSql18, lcSql19
LOCAL lcSql20, lcSql21, lcSql22, lcSql23
LOCAL lnHandle, lnReturn, lcSortRange2
View book_search.js
String.prototype.format = function() {
var formatted = this;
for(arg in arguments) {
formatted = formatted.replace("{" + arg + "}", arguments[arg]);
return formatted;
$(document).ready(function() {
You can’t perform that action at this time.