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
%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*- | |
%% ex: ft=erlang ts=4 sw=4 et | |
[ | |
%% Riak Core config | |
{riak_core, [ | |
%% Default location of ringstate | |
{ring_state_dir, "/var/db/riak/ring"}, | |
%% Raise the initial ring size | |
{ring_creation_size, 256 }, |
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
'use strict'; | |
/* | |
* Homework assignment 2.2 for M101P, using node.js | |
* | |
* Notes: this only works because the student id | |
* increments by 1, and also because each student | |
* has more than 1 homework score. If either of | |
* those conditions weren't true, this code would | |
* be totally wrong (and dangerous!). | |
* |
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
db.test.find({}).forEach( function(obj) { | |
var _idTimestamp = obj._id.getTimestamp(); | |
obj.created = _idTimestamp.getTime(); | |
db.test.save(obj) | |
}); |
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
# These rules generate rules to keep network interface names unchanged | |
# across reboots and write them to /etc/udev/rules.d/70-persistent-net.rules. | |
# variables used to communicate: | |
# MATCHADDR MAC address used for the match | |
# MATCHID bus_id used for the match | |
# MATCHDRV driver name used for the match | |
# MATCHIFTYPE interface type match | |
# COMMENT comment to add to the generated rule | |
# INTERFACE_NAME requested name supplied by external tool |
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
# Add Cloudera RPM-GPG-KEY and repo | |
rpm --import http://archive.cloudera.com/cdh4/redhat/6/x86_64/cdh/RPM-GPG-KEY-cloudera | |
rpm -ivh http://archive.cloudera.com/cdh4/one-click-install/redhat/6/x86_64/cloudera-cdh-4-0.x86_64.rpm | |
# note: if you want to install a specific version, | |
# modify /etc/yum.repos.d/cloudera-cdh4.repo accordingly. | |
# For example, if you want to install 4.2.1, use the following baseurl: | |
# baseurl=http://archive.cloudera.com/cdh4/redhat/6/x86_64/cdh/4.2.1/ | |
# Install CDH4 Base |
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
# prereqs | |
yum groupinstall "Development tools" | |
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel | |
# python | |
curl -O http://www.python.org/ftp/python/2.7.5/Python-2.7.5.tgz | |
tar -C /usr/src -xzvf Python-2.7.5.tgz | |
cd /usr/src/Python-2.7.5/ | |
./configure --prefix=/usr/local |
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
git clone -b v0.10.20-release https://github.com/joyent/node.git | |
cd node | |
./configure --prefix=/ --without-snapshot | |
export BIN_NAME=node-v0.10.20-linux-armv7l-chromebook | |
mkdir ${BIN_NAME} | |
make install DESTDIR=${BIN_NAME} V=1 PORTABLE=1 |
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
# Add Cloudera RPM-GPG-KEY and repo | |
rpm --import http://archive.cloudera.com/cdh4/redhat/6/x86_64/cdh/RPM-GPG-KEY-cloudera | |
rpm -ivh http://archive.cloudera.com/cdh4/one-click-install/redhat/6/x86_64/cloudera-cdh-4-0.x86_64.rpm | |
# note: if you want to install a specific version, | |
# modify /etc/yum.repos.d/cloudera-cdh4.repo accordingly. | |
# For example, if you want to install 4.2.1, use the following baseurl: | |
# baseurl=http://archive.cloudera.com/cdh4/redhat/6/x86_64/cdh/4.2.1/ | |
# Install CDH4 httpfs Base |
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
'use strict'; | |
// npm install colors moment optimist | |
// builtins | |
var http = require('http'), | |
// 3rd party | |
colors = require('colors/safe'), | |
moment = require('moment'); |
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/bash | |
# required build environment packages: binfmt-support qemu qemu-user-static debootstrap kpartx lvm2 dosfstools | |
# made possible by: | |
# Klaus M Pfeiffer (http://blog.kmp.or.at/2012/05/build-your-own-raspberry-pi-image/) | |
# Alex Bradbury (http://asbradbury.org/projects/spindle/) | |
deb_mirror="http://archive.raspbian.org/raspbian/" | |
deb_local_mirror=$deb_mirror | |
deb_release="wheezy" |