Skip to content

Instantly share code, notes, and snippets.

View elorest's full-sized avatar

Isaac Sloan elorest

View GitHub Profile
#include <stdio.h>
struct Person{
char * name;
char * height;
int age;
};
void hello_ptr(const struct Person * p){
require "socket"
UNIXSocket.open("/tmp/cr.sock") do |sock|
puts "What is your name?"
name = gets
sock.puts name
puts sock.gets
sock.close
end
require 'rrobots'
class Elorest
include Robot
def tick events
@time = "hello" if time == 0
say @time
# @planned ||= events['robot_scanned'].inspect
# say @planned
@elorest
elorest / isaac_tmate.sh
Created April 2, 2014 23:38
isaac tmate
# placeholder for domains to ssh into.
xdef distance(a, b)
return a.length if (0 == b.length)
return b.length if (0 == a.length)
unpack_rule = ($KCODE =~ /^U/i) ? 'U*' : 'C*'
mapper = lambda{|str|
str = str.unpack(unpack_rule)
map = []
str.each_with_index {|letter,idx|