- CloudStack is all about allocating a pool of resources out to customers/clients but we don't have a pool of assets (racks of machines) when developing. Luckily there is a pre-configured VirtualBox VM all setup to pretend to be available to CloudStack for just such testing/development purposes.
- Follow these instructions: http://wiki.cloudstack.org/display/COMM/DevCloud
- I work out of
~/eng
, so thecloudstack
git repo is there, but it's scripted to live elsewhere, so...mkdir -p /opt/cloudstack
(might have to sudo, chmod etc.)ln -s /Users/gburd/eng/cloudstack /opt/cloudstack/incubator-cloudstack
- We'll need the cloudstack-python-client later, install that...
git clone git://github.com/jasonhancock/cloudstack-python-client.git
cd cloudstack-python-client
pip install .
- A few
ant
commands will need additional jars in your Ant library path, so do that...
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
function abbreviate_number(num) | |
{ | |
var sizes = ['', 'thousand', 'million', 'billion', 'trillion', 'quadrillion', 'quintillion', 'sextillion', 'septillion']; | |
if (num < 1000) return num; | |
var i = parseInt(Math.floor(Math.log(num) / Math.log(1000))); | |
return ((i == 0) ? (num / Math.pow(1000, i)) : (num / Math.pow(1000, i)).toFixed(1)) + ' ' + sizes[i]; // use .round() if you don't want the decimal | |
}; |
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
-module(user_default). | |
-author('[email protected]'). | |
%% Compile this file and use this line in your ~/.erlang file (with | |
%% correct path, of course!) to where the user_default.beam file is stored. | |
%% | |
%% code:load_abs("/home/fritchie/erlang/user_default"). | |
-export([help/0,dbgtc/1, dbgon/1, dbgon/2, | |
dbgadd/1, dbgadd/2, dbgdel/1, dbgdel/2, dbgoff/0, |
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
diff --git a/Makefile b/Makefile | |
index 33bfb0a..af625c8 100644 | |
--- a/Makefile | |
+++ b/Makefile | |
@@ -29,10 +29,10 @@ OBJS = \ | |
vm.o\ | |
# Cross-compiling (e.g., on Mac OS X) | |
-#TOOLPREFIX = i386-jos-elf- | |
+TOOLPREFIX = /opt/gnu/bin/i386-jos-elf- |
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
/* | |
sudo apt-get install libblocksruntime-dev | |
clang -fblocks clang-blocks.c -lBlocksRuntime -o clang-blocks | |
CAVEAT: only works with clang and BlocksRuntime | |
*/ | |
#include <stdio.h> | |
int main(void) | |
{ |
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
/* | |
* async_nif: An async thread-pool layer for Erlang's NIF API | |
* | |
* Copyright (c) 2012 Basho Technologies, Inc. All Rights Reserved. | |
* Author: Gregory Burd <[email protected]> <[email protected]> | |
* | |
* This file is provided to you under the Apache License, Version 2.0 (the | |
* "License"); you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at: | |
* |
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
#!/usr/bin/env bash | |
# Note: erlang depends on ncurses, openssl at a minimum | |
usage () | |
{ | |
echo "usage: $0 <release> <type>" | |
echo " release: R14B01|R14B02|R14B03|R14B04|R15B|R15B01|R15B02|R15B03|R16B|R16B01|R16B02" | |
echo " type: normal, opt, gcov, gprof, debug, valgrind, or lcnt" |
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 | |
# | |
# ./generate-node.sh -p 8087 -P 192.168.1.201 -h 8098 -H 192.168.1.201 -d 8099 -D 192.168.1.201 -s riak_kv_eleveldb_backend /mnt/riak/bin/riak /data/solid/riak | |
while [ "${1:0:1}" = "-" -a "${#1}" -eq 2 ]; do | |
case ${1:1:1} in | |
p) | |
shift | |
pb_port="$1" | |
shift |
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
// btree version 2n | |
// 26 APR 2010 | |
// author: karl malbrain, [email protected] | |
/* | |
This work, including the source code, documentation | |
and related data, is placed into the public domain. | |
The orginal author is Karl Malbrain. |
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
%% -*- coding: utf-8 -*- | |
%% | |
%% %CopyrightBegin% | |
%% | |
%% Copyright (C) 2013 Gregory Burd. All Rights Reserved. | |
%% | |
%% The contents of this file are subject to the Mozilla Public License, | |
%% Version 2, (the "License"); you may not use this file except in | |
%% compliance with the License. You should have received a copy of the | |
%% Mozilla Public License along with this software. If not, it can be |