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
from werkzeug import SharedDataMiddleware | |
import os | |
import logging | |
from panel import app | |
# Serve static files through Flask during development | |
app.wsgi_app = SharedDataMiddleware(app.wsgi_app, { | |
'/': os.path.join(os.path.dirname(__file__), 'static') | |
}) |
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
server { | |
listen 80; | |
server_name www.coefficientinc.com coefficientinc.com; | |
root /opt/www/coefficient/static; | |
try_files $uri @uwsgi; | |
location @uwsgi { | |
include uwsgi_params; |
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
<?php | |
/** | |
* JSON server | |
*/ | |
class JSONServer | |
{ | |
/** | |
* @var the service object instance | |
*/ | |
private $obj; |
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
"""Convenience methods for interacting with the database. | |
Calling get_db_connection() will return the open database handle. | |
""" | |
import psycopg2 | |
from psycopg2.extras import DictConnection | |
from contextlib import closing | |
import configure |
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
" Skyler's .vimrc | |
set nocompatible " be iMproved! | |
filetype plugin indent on " plugin and indent are required for Pathogen | |
syntax on | |
colorscheme jellybeans | |
" Pathogen | |
call pathogen#infect() |
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
{ | |
"AK": "Alaska", | |
"AL": "Alabama", | |
"AS": "American Samoa", | |
"AZ": "Arizona", | |
"AR": "Arkansas", | |
"CA": "California", | |
"CO": "Colorado", | |
"CT": "Connecticut", | |
"DE": "Delaware", |
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 | |
VENV=$1 | |
if [ -z $VENV ]; then | |
echo "usage: runinenv [virtualenv_path] CMDS" | |
exit 1 | |
fi | |
. ${VENV}/bin/activate | |
shift 1 | |
echo "Executing $@ in ${VENV}" | |
exec "$@" |
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 | |
S3_ACCESS_KEY=XXX | |
FILENAME=$(date +"coefficient_%Y_%m_%d.pg") | |
PATH=/home/skyler/ | |
echo "dumping database..." | |
/usr/bin/pg_dump coefficient --file $PATH$FILENAME | |
echo "uploading backup to S3..." |
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
"tickets.py" 20L, 502C written | |
from pprint import pprint | |
num_servers = 3 | |
ids = [] | |
gen_how_many = 10000 | |
i = 0 | |
while i < num_servers: |
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
office.announce.out-sick | |
office.announce.benefits | |
office.announce.fridge-cleaning | |
office.announce.general | |
developers.tech-news | |
developers.programming | |
rec.events.orlando | |
industry-news | |
in-the-news | |
product |