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
{ | |
"brand": "joyent", | |
"dataset_uuid": "templates/smartos64", | |
"max_physical_memory": 1024, | |
"nics": [ | |
{ | |
"nic_tag": "admin", | |
"ip": "dhcp" | |
} | |
] |
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 | |
initrd http://webserver.fqdn/iso/firmware.iso | |
chain http://webserver.fqdn/memdisk/memdisk iso || | |
echo | |
echo netboot failed, attempting to boot from local disk | |
echo | |
sanboot --no-describe --drive 0x80 || | |
echo | |
echo local boot failed, booting ipxe shell |
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
var rl = require('readline'); | |
var fs = require('fs'); | |
var i = rl.createInterface(process.stdin, process.stdout, null); | |
i.question("Enter the UUID to correct: ", function(answer) { | |
var uuidArray = answer.split("-"); | |
// only the first half of the UUID is wrong, so iterate |
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
.encoding = "UTF-8" | |
config.version = "8" | |
virtualHW.version = "4" | |
numvcpus = "2" | |
memsize = "2048" | |
ide0:0.present = "TRUE" | |
ide0:0.fileName = "ide.vmdk" | |
ethernet0.present = "TRUE" | |
ethernet0.virtualDev = "e1000" | |
svga.autodetect = "FALSE" |
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
{ | |
"brand": "joyent", | |
"dataset_uuid": "e8c41d40-f161-11e1-b839-a3631c115653", | |
"max_physical_memory": 1024, | |
"nics": [ | |
{ | |
"nic_tag": "admin", | |
"ip": "dhcp", | |
"gateway": "192.168.0.254" | |
} |
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
%% -*- 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 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
# download latest libevent2 and tmux sources, and extract them somewhere | |
# (thx bluejedi for tip on latest tmux URL) | |
# | |
# at the time of writing: | |
# https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz | |
# http://sourceforge.net/projects/tmux/files/latest/download?source=files | |
# | |
# install deps | |
yum install gcc kernel-devel make ncurses-devel |
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!). | |
* |
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
#!/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" |
OlderNewer