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 | |
# 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
# -*- 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
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
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
/* | |
* barnstormer | |
* https://github.com/condenast/barnstormer | |
* | |
* Copyright (c) 2013 Condé Nast. All rights reserved. | |
*/ | |
var sync; | |
if (typeof define !== 'function') { |
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
// backbone.sync adaptor that uses mongojs to store models | |
// returns a q.defer().promise | |
'use strict'; | |
var mongojs = require('mongojs'); | |
var q = require('q'); | |
module.exports = function (method, model, options) { | |
var app = require('../app'); | |
var d = q.defer(); |
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
#/bin/sh | |
PIVOTAL_ACCESS= | |
PIVOTAL_PROJECT_ID= | |
GITHUB_ACCESS= | |
DEFAULT_BRANCH=development | |
TO_REPO_OWNER=CondeNast | |
FROM_REPO_OWNER=CondeNast | |
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
11:54:58 ~/src/.../conde/cnt-feature-slideshow:spike-all-slides-styling ☹ | |
↳ npm ls | grep handlebars | |
│ ├─┬ [email protected] | |
├── [email protected] | |
│ ├─┬ [email protected] | |
│ ├─┬ [email protected] | |
npm ERR! missing: Imager.js@git://github.com/joewillnyc/Imager.js#on-images-replaced-event, required by [email protected] | |
npm ERR! extraneous: [email protected] /Users/tkenned2/src/conde/cnt-feature-slideshow/node_modules/imager.js | |
npm ERR! not ok code 0 | |
11:55:03 ~/src/.../conde/cnt-feature-slideshow:spike-all-slides-styling ☹ |
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 vms(){ | |
VMNAME=" " | |
if [[ -d .vagrant ]]; then | |
for MACHINE in `ls .vagrant/machines`; do | |
IDFILE=".vagrant/machines/$MACHINE/virtualbox/id"; | |
if [ -f $IDFILE ]; then | |
ID=$(cat $IDFILE); | |
VMNAME=$(vboxmanage list runningvms| grep $ID | awk -F'["_]' '{print $2}'); | |
fi | |
done |