This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
#!ipxe | |
echo | |
echo attempting to netboot with IP ${ip} | |
echo | |
set buildserver your.build.server.fqdn | |
set pxebase http://${buildserver}/path/to/bootfiles/dir | |
kernel ${pxebase}/linux preseed/url=http://${buildserver}/${uuid}/preseed.cfg debian-installer/locale=en_US.UTF- | |
8 keymap=us netcfg/get_hostname=${uuid} netcfg/get_domain=${domain} -- | |
initrd ${pxebase}/initrd.gz | |
boot || |
This file contains hidden or 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
#### Contents of the preconfiguration file (for wheezy) | |
### Localization | |
d-i debian-installer/locale string en_US.UTF-8 | |
d-i debian-installer/keymap select us | |
d-i keymap select us | |
### Network configuration | |
d-i netcfg/choose_interface select auto | |
### Mirror settings |
This file contains hidden or 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 hidden or 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 | |
# * eth0 = Internet interface (DHCP) | |
# * eth1 = LAN interface (192.168.1.0/24) | |
# * eth2 = DMZ interface (172.16.0.0/16) | |
# * Traffic open from firewall to internet | |
# * Traffic open and translated from LAN and DMZ to internet | |
# * Traffic open from LAN to Firewall | |
# * Traffic open from LAN to DMZ | |
# * Traffic open from internet to a DMZ web server |
This file contains hidden or 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" |
This file contains hidden or 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 hidden or 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!). | |
* |