This file contains hidden or 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
{% set app='example' %} | |
upstream {{app}} { | |
{% if pillar.role == 'staging' %} | |
server {{app}}.stage.ccnmtl.columbia.edu.s3-website-us-east-1.amazonaws.com; | |
{% else %} | |
server {{app}}.ccnmtl.columbia.edu.s3-website-us-east-1.amazonaws.com; | |
{% endif %} | |
} | |
server { |
This file contains hidden or 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
var requirejs = require('requirejs'); | |
var jsdom = require('mocha-jsdom'); | |
var assert = require('assert'); | |
requirejs.config(require('../../config/test_config').options); | |
describe('models/user', function() { | |
jsdom(); | |
// local operations on a model should be fast |
This file contains hidden or 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/bash | |
declare -a apps=("capsim" "carr" "ccdb" "countryx" "diabeaters" "dmt" "forest" "mediamachine" "mvsim" "nynjaetc" "plexus" "pump" "rolf" "smart_sa" "smilekit" "ssnm" "tala" "uelc" "wacep" "wardenclyffe" "worth2") | |
for app in "${apps[@]}" | |
do | |
echo "============== $app ===============" | |
cd $app | |
git checkout master | |
git pull |
This file contains hidden or 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 | |
import os | |
import sys | |
class TrieNode(object): | |
def __init__(self): | |
self.children = dict() | |
self.count = 0 |
This file contains hidden or 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
import requests | |
from socket import socket | |
import time | |
URLS = [("wiki.", "http://wiki.ccnmtl.columbia.edu/"), | |
("jtsa.", "http://learn.jtsa.edu/"), | |
("polarhub.", "http://thepolarhub.org/"), | |
("edblogs.", "http://edblogs.columbia.edu/"), | |
] | |
CARBON_HOST = "nanny.cul.columbia.edu" |
This file contains hidden or 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/bash | |
for app in `echo */`; do | |
echo $app | |
cd $app | |
git pull | |
perl -pi -e 's/Django==1.6.4/Django==1.6.5/' requirements.txt | |
make && git commit -a -m "Django -> 1.6.5" && git push | |
cd .. | |
done |
This file contains hidden or 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
// A | |
if ((err = SSLHashSHA1.update(&hashCtx, &signedParams)) != 0) { | |
goto fail | |
goto fail | |
} | |
// B | |
if ((err = SSLHashSHA1.update(&hashCtx, &signedParams)) != 0) { | |
goto fail | |
} |
This file contains hidden or 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
# A | |
if some_condition: | |
goto fail | |
goto fail | |
# B | |
if some_condition: | |
goto fail | |
goto fail |
This file contains hidden or 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
if ((err = SSLHashSHA1.update(&hashCtx, &signedParams)) != 0) | |
goto fail; | |
goto fail; |
This file contains hidden or 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
if ((err = SSLHashSHA1.update(&hashCtx, &signedParams)) != 0) | |
goto fail; | |
goto fail; |