Skip to content

Instantly share code, notes, and snippets.

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 Ghetto API.rb
require 'rake'
require 'net/ssh'
require 'net/scp'
require "net/http"
require "json"
USER = PASSWORD = 'vagrant'
'gold' => '',
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 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");
View gist:2918213
public void SavingFile()
StreamWriter writer = new StreamWriter("books.txt");
foreach (Book book in books)
View Package.cs
public class Package {
private double Height, Length, Width, weight;
private bool air = false;
public double Height
get { return Height; }
set { Height = value; }
public double Length
View Assignment1
// Require Package
public class Assignment1 {
public static void main(String[] argv){
// get package count
// packages = array of packages
// cost = 0;
View gist:2068313
This test works on Ruby 1.8.7, but blows up on ruby 1.9.2p318
< Some Test Fails >
wrong number of arguments (2 for 0)
< Path Snip >/gems/activesupport-2.3.14/lib/active_support/ordered_hash.rb:16:in `block in to_yaml'
<The offending line>
out.seq(taguri, to_yaml_style) do |seq|
fails because it is called from
ChrisLundquist / iptc test
Created Feb 26, 2012
test for collectd dependency
View iptc test
/* gcc test.c -liptc -o a.out */
/* libiptc must be root to run since it maps kernel stuff, otherwise it segfaults */
#include <libiptc/libiptc.h> /* ip_t* */
int main(int argc, char** argv){
struct iptc_handle *handle = NULL;
handle = iptc_init("filter");
return 0;
ChrisLundquist / Week05Assig
Created Feb 5, 2012
Hadossa Oudean's Week05 Assignment
View Week05Assig
/*This program was created by Hadossa Oudean.*/
import javax.swing.*;
public class Week05 {
static File select;
static String path;
static boolean okay;
static boolean foundIt;