Skip to content

Instantly share code, notes, and snippets.

#command-line install of Aquamacs-Emacs (XXX make this a chef recipe)
curl -o Aquamacs-Emacs-2.0.dmg http://d10xg45o6p6dbl.cloudfront.net/projects/a/aquamacs/Aquamacs-Emacs-2.0.dmg
hdiutil attach Aquamacs-Emacs-2.0.dmg
sudo cp -r /Volumes/Aquamacs\ Emacs/Aquamacs.app /Applications
hdiutil detach /Volumes/Aquamacs\ Emacs
rm Aquamacs-Emacs-2.0.dmg
REM cscript /nologo chef-client-bootstrap.vbs
Exe = "rubyinstaller-1.8.7-p249-rc2.exe"
Url = "http://rubyforge.org/frs/download.php/69034/" & Exe
Dst = "C:\Ruby"
Set Shell = CreateObject("WScript.Shell")
Set Fs = CreateObject("Scripting.FileSystemObject")
If Fs.FileExists(Exe) Then
WScript.Echo "Using existing " & Exe
#unsed in Chef::Util::Windows::NetUse; may come in handy later.
require 'chef/util/windows'
class Chef::Util::Windows::NetUse < Chef::Util::Windows
def get_all
list = []
handle = 0.chr * PTR_SIZE
rc = ERROR_MORE_DATA
while rc == ERROR_MORE_DATA
Ohai from Windows 2003 server:
C:\Ruby>ohai
{
"keys": {
},
"dmi": {
},
"kernel": {
"modules": {
@dougm
dougm / gist:399241
Created May 12, 2010 22:59
example ohai languages::c output
//darwin:
"languages": {
"c": {
"gcc": {
"version": "4.2.1",
"description": "gcc version 4.2.1 (Apple Inc. build 5659)"
}
},
//windows:
#collectd-dynomite.conf command-line test config
#original patch (now in collectd master branch) http://bit.ly/ccprC
#install dynomite: http://github.com/cliffmoon/dynomite
#install yajl libs (and libcurl-devel)
#% git clone git://git.verplant.org/collectd.git
#% ./build.sh && ./configure && make
#% ./src/collectd -T -C ~/test/collectd-dynomite.conf
#PUTVAL mako/couchdb-dynomite@thresher/gauge--get_rate interval=10 1246306113:0.000000
#PUTVAL mako/couchdb-dynomite@thresher/gauge--put_rate interval=10 1246306113:0.000000
#PUTVAL mako/couchdb-dynomite@thresher/gauge--connections interval=10 1246306113:0.000000
/*
* tinkering w/ the idea of a couchdb C api, shelved in favor of http://bit.ly/ccprC
* but the jist is to use map keys to lookup structure offsets.
* did not give any thought to POST, PUT, etc.
* gcc -Wall -g -o ycouchdb ycouchdb.c -I/usr/local/include/yajl -L/usr/local/lib -lyajl
* curl -s http://localhost:5984/_stats/httpd/requests | ./ycouchdb /_stats/httpd/requests
*/
#include <yajl/yajl_parse.h>
#include <yajl/yajl_gen.h>
#!/bin/sh
#git mirror jets3t cvs
#create:
#git-cvsimport -d :pserver:[email protected]:/cvs -p x -v jets3t
#update:
git-cvsimport -d :pserver:[email protected]:/cvs -k -u -v -m -p -Z,9 jets3t
#!/usr/bin/perl
#hadoop-metric-gen.pl
use strict;
#generate some test data for hadoop-collectd
#http://hadoop.apache.org/core/docs/current/quickstart.html
#svn co http://svn.apache.org/repos/asf/hadoop/core/trunk hadoop-core-trunk
#cd hadoop-core-trunk
#ant jar examples