Skip to content

Instantly share code, notes, and snippets.

View gist:2922280
//Nicole Buck
//Prog 109 Project 3
var bet = 0;
var credits = 100;
var count = 0;
var slotImages = new Array("lemon.png", "plum.png", "bell.png", "diamond.png", "clover.jpg");
ChrisLundquist / gist:3005864
Created Jun 27, 2012
Razor daemon error log
View gist:3005864
Sending: /opt/razor/image/os/7heF69c3hApMqxgzOWEmxd/Packages/basesystem-10.0-4.el6.noarch.rpm, Mimetype: application/octet-stream, Size:4784
Start offset: undefined, End offset: undefined
Sending: /opt/razor/image/os/7heF69c3hApMqxgzOWEmxd/Packages/dhcp-common-4.1.1-25.P1.el6.x86_64.rpm, Mimetype: application/octet-stream, Size:142064
Start offset: undefined, End offset: undefined
Sending: /opt/razor/image/os/7heF69c3hApMqxgzOWEmxd/Packages/ca-certificates-2010.63-3.el6_1.5.noarch.rpm, Mimetype: application/octet-stream, Size:543988
Start offset: undefined, End offset: undefined
View Ghetto API.rb
require 'rake'
require 'net/ssh'
require 'net/scp'
require "net/http"
require "json"
USER = PASSWORD = 'vagrant'
'gold' => '',
View gist:3061873
curl -kX POST `ifconfig | grep -Po \([0-9a-fA-F]{2}:\){5}[0-9a-fA-F]{2} | perl -pe 's/^/-d mac\[\]=/'`
View gist:3093930
root@collectd03:/opt/razor# git remote update
Fetching origin
Fetching bluebox
Fetching lynxbat
root@collectd03:/opt/razor# git diff lynxbat/master
diff --git a/bin/razor b/bin/razor
index 910ac06..8d0f080 100755
ChrisLundquist / gist:3435159
Created Aug 23, 2012
valgrind output on Mountain Lion
View gist:3435159
==46255== HEAP SUMMARY:
==46255== in use at exit: 63,867 bytes in 354 blocks
==46255== total heap usage: 1,459 allocs, 1,105 frees, 162,223 bytes allocated
==46255== 16 bytes in 1 blocks are definitely lost in loss record 7 of 84
==46255== at 0xC8E6: malloc_zone_malloc (vg_replace_malloc.c:276)
==46255== by 0x4F1413: recursive_mutex_init (in /usr/lib/libobjc.A.dylib)
==46255== by 0x4F0025: _objc_init (in /usr/lib/libobjc.A.dylib)
==46255== by 0x134B27: libSystem_initializer (in /usr/lib/libSystem.B.dylib)
ChrisLundquist /
Created Sep 13, 2012
msvc env for cygwin
INCLUDE='c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE;c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE;c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include;'
LIB='c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\LIB;c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\LIB;c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\lib;'
LIBPATH='c:\Windows\Microsoft.NET\Framework\v4.0.30319;c:\Windows\Microsoft.NET\Framework\v3.5;c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\LIB;c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\LIB;'
WindowsSdkDir='c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\'
VSINSTALLDIR='c:\Program Files (x86)\Microsoft Visual Studio 10.0\'
VCINSTALLDIR='c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\'
MSVC_PATH='/usr/local/bin:/usr/bin:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/VSTSDB/Dep
ChrisLundquist / proof.txt
Created Sep 13, 2012
Success of cl.exe via ssh to a win 7 guest
View proof.txt
localhost:nebula clundquist$ ssh win
Last login: Thu Sep 13 14:15:09 2012 from
Durandal@Simulacrum ~
$ cl.exe
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
usage: cl [ option... ] filename... [ /link linkoption... ]
ChrisLundquist / page_test.cpp
Created Sep 14, 2012
Proof of concept for Page allocator
View page_test.cpp
#include <iostream>
template <int size> class Page{
char bytes[size];
int main(void) {
Page<10> p1;
Page<200> p2;
View gist:3862736
public class Dice {
void roll();
int get_value();
string to_string();
IMAGE get_image();
int value;