Skip to content

Instantly share code, notes, and snippets.

View bmnick's full-sized avatar

Ben Nicholas bmnick

View GitHub Profile
#include "ruby.h"
VALUE CExt = Qnil;
VALUE method_floatmul(VALUE self);
VALUE method_loop_floatmul(VALUE self);
void Init_CExt() {
CExt = rb_define_module("CExt");
rb_define_singleton_method(CExt, "floatmul", method_floatmul, 0);
nesta new <yoursitename> --git
ln -s `pwd`/<yoursitename> /var/www/nesta
cd <yoursitename>
mkdir log
mkdir tmp
mkdir tmp/sockets
mkdir tmp/pids
@bmnick
bmnick / se452HW3mkmf.rb
Created January 4, 2011 04:11
Make a makefile to tell you the missing mutants
dependency_line = 'check : '
targets = Array.new
1.upto(65).each do |testnum|
dependency_line << "#{testnum} "
targets << "#{testnum} : \n\t@(./mdates -v -i sampledata.txt | grep \"Killed mutant #{testnum}\" > /dev/null ) || echo \"Missing mutant #{testnum}\""
end
puts dependency_line
puts ''
targets.each do |target|
/* mdates.c -- find number of days between 2 dates - mutation version
Mark Ardis, Rose-Hulman Institute
3/19/2006
*/
#include <stdio.h>
#include <string.h>
#define MAXLINE 1000 // maximum input line size
puts('Hello World!')