Skip to content

Instantly share code, notes, and snippets.

var redisScan = require('redisscan');
var redis = require('redis');
var riak = require('riakpbc');
var async = require('async');
var args = require('optimist')
.usage('--import or --export Redis archives in Riak\nUsage: $0')
.boolean('import')
.boolean('export')
.boolean('debug')
.describe('import', "Import from Riak to Redis")

An RSVP-list demo on top of Riak 2.0 Datatypes

This is a purely in-browser demo of Riak 2.0's sets datatype. The application code uses React.js and jquery.

To get started, make a 5-node devrel cluster of the 2.0 preview using these instructions. After your cluster is built, make a bucket-type for sets:

cd dev/dev1
bin/riak-admin bucket-type create sets '{"props":{"datatype":"set","allow_mult":true}}'
bin/riak-admin bucket-type activate sets
@nivertech
nivertech / gist:4b5b9d3da506f75f497c
Last active August 29, 2015 14:01
Install_R.rb
## @author Zvi Avraham
## @copyright 2012-2014 ZADATA Ltd. All Rights Reserved.
define :install_R do
# Needed for RCurl CRAN package:
# sudo apt-get install libcurl4-opensll-dev
Packages = %w[
build-essential libtool m4 autoconf
@nivertech
nivertech / gist:9260ea8dffe01b29909e
Created May 29, 2014 00:41
Running Clojure example on OSv
# install capstan first - https://github.com/cloudius-systems/capstan/wiki/Capstan-Installation
$ git clone git@github.com:cloudius-systems/capstan-example-clojure.git
$ cd capstan-example-clojure/
$ capstan build
Building capstan-example-clojure...
Downloading cloudius/osv-openjdk/index.yaml...
149 B / 149 B [=========================================================================================] 100.00 %
Downloading cloudius/osv-openjdk/osv-openjdk.qemu.gz...
@nivertech
nivertech / gist:ea41abd099161c832d44
Created May 29, 2014 01:04
How to build qemu on Debian/Ubuntu
wget http://wiki.qemu-project.org/download/qemu-2.0.0.tar.bz2
tar -xvpf qemu-2.0.0.tar.bz2
cd qemu-2.0.0/
./configure --target-list=x86_64-softmmu
make
sudo make install
@nivertech
nivertech / erl.d
Created May 31, 2014 17:16 — forked from Licenser/erl.d
erlang$1:::*-function-entry
{
self->funcall_entry_ts[copyinstr(arg1)] = vtimestamp;
}
erlang$1:::function-return
/self->funcall_entry_ts[copyinstr(arg1)]/
{
@time[copyinstr(arg1)] = quantize((vtimestamp - self->funcall_entry_ts[copyinstr(arg1)] ) / 1000);
}
deb http://binaries.erlang-solutions.com/debian precise contrib
wget -O - http://binaries.erlang-solutions.com/debian/erlang_solutions.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install esl-erlang

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
import urllib2
import re
from BeautifulSoup import *
from datetime import *
symbols = ['YHOO', 'MU', 'AA', 'CI', 'EOG', 'ZMH', 'G', 'HON', 'IWM', 'WYE', 'JCP', 'OXY', 'AAPL', 'SBUX', 'MO', 'KLAC', 'SIRI', 'GDT', 'WMT', 'LLTC', 'PALM', 'EA', 'SUN', 'CL', 'JAVA', 'SMH', 'NBR', 'JNJ', 'GCI', 'SHLD', 'AMD', 'ORCL', 'ERIC', 'LEH', 'WLP', 'CAH', 'LXK', 'CAR', 'CVX', 'GE', 'DE', 'NTAP', 'BSC', 'VRSN', 'DNA', 'GENZ', 'ASKJ', 'BRCM', 'TGT', 'MCD', 'CMCS', 'KBH', 'SYMC', 'BAC', 'NCC', 'BSX', 'IR', 'UNH', 'F', 'ADBE', 'MDY', 'CCL', 'TASR', 'SCHW', 'GS', 'T', 'ADI', 'MON', 'HOG', 'DIA', 'SEPR', 'BTU', 'X', 'D', 'GILD', 'NEM', 'BUD', 'MET', 'CMX', 'AVP', 'MDT', 'QCOM', 'XLNX', 'XOM', 'AMGN', 'OSTK', 'AXP', 'AET', 'GLW', 'KMG', 'GM', 'MXIM', 'APOL', 'SGP', 'IBM', 'MS', 'SNDK', 'BA', 'KO', 'MER', 'RTH', 'M', 'FDC', 'PD', 'XLE', 'XLF', 'FLEX', 'KRB', 'UTX', 'TZOO', 'FDX', 'NKE', 'NXTL', 'DOW', 'HES', 'KSS', 'BP', 'BIIB', 'BBBY', 'SII', 'DELL', 'AIG', 'HIG', 'BBY', 'EBAY', 'RD', 'GPS', 'MERQE', 'PEP', 'IGT', 'CECO', 'ALL', '