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
-module(db). | |
-export([new/0, write/3, destroy/1, delete/2, read/2, match/2, test/0]). | |
new() -> []. | |
write(Key, Element, Db) -> [{Key, Element}|Db]. | |
read(Key, [Head | Tail]) -> | |
{K, V} = Head, | |
if |
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/python | |
import os | |
import sys | |
import optparse | |
import progressbar | |
import time | |
from boto.s3.connection import S3Connection | |
from boto.exception import S3ResponseError |
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 django.conf import settings | |
from django.contrib.auth import models as auth_models | |
import cgi | |
import urllib | |
import simplejson | |
from <app_name> import models | |
class FacebookBackend: |
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/sh | |
## BEGIN INIT INFO | |
# Provides: FastCGI servers for PHP | |
# Required-Start: networking | |
# Required-Stop: networking | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: S 0 1 6 | |
# Short-Description: Start FastCGI servers with PHP. | |
# Description: Start PHP with spawn-fcgi. For use with nginx and lighttpd. |
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/python | |
import fcntl | |
import optparse | |
import os | |
import progressbar | |
import re | |
import select | |
import shlex | |
import subprocess |
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/sh | |
### BEGIN INIT INFO | |
# Provides: FastCGI servers for Django | |
# Required-Start: networking | |
# Required-Stop: networking | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: S 0 1 6 | |
# Short-Description: Start FastCGI servers with Django. | |
# Description: Django, in order to operate with FastCGI, must be started | |
# in a very specific way with manage.py. This must be 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
* << Request >> 32770 | |
- Begin req 32769 rxreq | |
- Timestamp Start: 1467657059.275449 0.000000 0.000000 | |
- Timestamp Req: 1467657059.275449 0.000000 0.000000 | |
- ReqStart 172.17.0.1 39322 | |
- ReqMethod GET | |
- ReqURL / | |
- ReqProtocol HTTP/1.1 | |
- ReqHeader User-Agent: curl/7.40.0 | |
- ReqHeader Accept: */* |
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/python3 | |
import argparse | |
import sys | |
from base64 import b64encode | |
from string import Template | |
parser = argparse.ArgumentParser() | |
parser.add_argument('env_file', nargs='?', type=argparse.FileType('r'), default=sys.stdin) |
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 | |
# Reflects the requests from HTTP methods GET, POST, PUT, and DELETE | |
# Written by Nathan Hamiel (2010) | |
from http.server import HTTPServer, BaseHTTPRequestHandler | |
from optparse import OptionParser | |
class RequestHandler(BaseHTTPRequestHandler): | |
def do_GET(self): |
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
# https://github.com/seebi/tmux-colors-solarized/blob/master/tmuxcolors-256.conf | |
set-option -g status-bg colour235 #base02 | |
set-option -g status-fg colour136 #yellow | |
set-option -g status-attr default | |
# set window split | |
bind-key v split-window -h | |
bind-key b split-window | |
# default window title colors |
OlderNewer