#Create bitbucket branch
##Create local branch
$ git checkout -b sync
Switched to a new branch 'sync'
$ git branch
master
* sync
require 'fileutils' | |
start_time = Time.now | |
SOURCE_DB = { | |
:name => 'db_name', | |
:user => 'db_user', | |
:password => 'db_pass', | |
:host => 'localhost' |
<!DOCTYPE html> | |
<html> | |
<head> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<script src="jquery.ketchup.all.min.js" type="text/javascript"></script> | |
</head> | |
<body> | |
<div id="email"> | |
<span>Enter your email to sign up</span> | |
<form action="/subscribe.php" id="invite" method="POST"> |
#Create bitbucket branch
##Create local branch
$ git checkout -b sync
Switched to a new branch 'sync'
$ git branch
master
* sync
#!/bin/sh | |
# script to automate the load and export to CSV of an oracle dump | |
# This script assumes: | |
# * you have the vagrant published key available locally in your .ssh directory | |
# * You have the Oracle VirtualBox image running locally | |
# ** ssh port-forwarding is configured for host port 2022 -> guess port 22. | |
set -e |
rsync (Everyone seems to like -z, but it is much slower for me)
prompt = function() { | |
var ndocs, obj, p, sec; | |
ndocs = function(n) { | |
return "" + n + " document" + (n > 1 ? 's' : ''); | |
}; | |
db.setProfilingLevel(2); | |
obj = db.getLastErrorObj(); | |
p = db.system.profile.find({ | |
$and: [ | |
{ns: {$not: /profile$/}}, |
A timeline of the last four years of detecting good old window.localStorage
.
October 2009: 5059daa
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"
IFS="$(printf '\n\t')" | |
mkdir -p ~/.ssh | |
if ! [[ -f ~/.ssh/authorized_keys ]]; then | |
echo "Creating new ~/.ssh/authorized_keys" | |
touch ~/.ssh/authorized_keys | |
fi | |
if type "curl" > /dev/null; then |
#!/bin/sh | |
#http://bit.ly/slavkobox | |
curl -sSL http://bit.ly/slavkodotfiles > bootstrap.sh && chmod +x bootstrap.sh && ./bootstrap.sh | |
curl -L http://bit.ly/voronenko | bash -s |