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
import os, subprocess, base64 | |
import tornado.ioloop | |
import tornado.web | |
from tornado.options import define, options, parse_command_line | |
define("port",default=8888,type=int) | |
define("branch",default="master") | |
define("access",type=str,multiple=True) | |
class MainHandler(tornado.web.RequestHandler): |
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 | |
# CRON | |
## delete encrypted backups older than 5 days | |
#55 3 * * * find /path/to/backups-enc -mtime +5 -exec rm {} \; | |
## delete un-encrypted backups older than 1 days | |
#55 3 * * * find /path/to/backups -mtime +0 -exec rm {} \; | |
## database dump at 4am UTC = 8pm PST (9pm PDT) | |
#0 4 * * * /path/to/this/script |
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 () { | |
"use strict"; | |
// for better performance - to avoid searching in DOM | |
var content = $('#content'); | |
var input = $('#input'); | |
var status = $('#status'); | |
// my color assigned by the server | |
var myColor = false; |
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
html, body, .container, .content { | |
height: 100%; | |
} | |
.container, .content { | |
position: relative; | |
} | |
.proper-content { | |
padding-top: 40px; /* >= navbar height */ |
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
<?php | |
class QueryStringTest extends PHPUnit_Framework_TestCase { | |
/** | |
* @covers remove_querystring_var | |
*/ | |
public function testRemoveQueryStringVar() { | |
// tests without any other querystring params |
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
# Unique, atomic sequential number generator using MongoMapper, MongoDB and Ruby. | |
# Usage: | |
# Helper::Sequence.next_value(:my_seq) | |
# => 1 | |
# Helper::Sequence.next_value(:my_seq) | |
# => 2 | |
# Helper::Sequence.next_value(:my_other_seq) | |
# => 1 | |
# Helper::Sequence.next_value(:my_seq) | |
# => 3 |