Skip to content

Instantly share code, notes, and snippets.

$(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;
@andreydjason
andreydjason / gist:2416031
Created April 18, 2012 19:43 — forked from philfreo/gist:2321650
mysqldump cron
#!/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
# 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