I hereby claim:
- I am bmulvihill on github.
- I am mangohabanero (https://keybase.io/mangohabanero) on keybase.
- I have a public key whose fingerprint is 27C6 1202 F986 6E95 2A8B 383D 04C8 ED8C 2524 5398
To claim this, I am signing this object:
#include "ruby.h" | |
static VALUE cLinkedList; | |
typedef struct rb_node { | |
VALUE data; | |
struct rb_node *next; | |
} Node; | |
typedef struct rb_linked_list { |
module Cacheable | |
def store | |
Rails.cache | |
end | |
def cache(*attributes) | |
attributes.each do |attribute| | |
if attribute.is_a?(Hash) | |
wrap(attribute.keys.first, attribute[attribute.keys.first]) |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env ruby | |
# Depth Limited Search | |
# Find the minimum cost/path on a graph given a start node, end node and set distance to travel | |
graph = {'A'=>[['B',6], ['C',1], ['E',2]], | |
'B'=> [['A',6], ['D',2], ['F',4]], | |
'C'=> [['A',1], ['G',3], ['E',2]], | |
'D'=> [['B',2]], | |
'E'=> [['A',2],['F',4], ['C',2]], | |
'F'=> [['B',1], ['E',4]], |
$.fn.serializeObject = -> | |
o = Object.create(null) | |
elementMapper = (element) -> | |
element.name = $.camelCase(element.name) | |
return element | |
appendToResult = (i, element) -> | |
node = o[element.name] | |
if ('undefined' != typeof node && node != null) | |
o[element.name] = if node.push then node.push(element.value) else [node, element.value] | |
else |