Skip to content

Instantly share code, notes, and snippets.

Avatar

Jonathan rondale-sc

  • Providence, Rhode Island
View GitHub Profile
View session.js
import Ember from 'ember';
const slice = Array.prototype.slice;
const computedPromise = function() {
const fn = slice.apply(arguments, [arguments.length-1, arguments.length])[0];
const dependentKeys = slice.apply(arguments, [0, arguments.length-1]);
return Ember.computed(...dependentKeys, function() {
const PromisableObjectProxy = Ember.ObjectProxy.extend(Ember.PromiseProxyMixin);
View rb_iseq_disasm.c
/* show each line */
for (n = 0; n < size;) {
n += rb_iseq_disasm_insn(str, iseq, n, iseqdat, child);
}
View iseq.c
VALUE
rb_iseq_disasm(VALUE self)
{
rb_iseq_t *iseqdat = iseq_check(self);
VALUE *iseq;
VALUE str = rb_str_new(0, 0);
VALUE child = rb_ary_new();
unsigned long size;
int i;
long l;
View iseq.c
/**
* Disassemble a instruction
* Iseq -> Iseq inspect object
*/
int
rb_iseq_disasm_insn(VALUE ret, VALUE *iseq, size_t pos,
rb_iseq_t *iseqdat, VALUE child)
{
VALUE insn = iseq[pos];
int len = insn_len(insn);
View food.md
  • Chipotle
  • Jason's
  • Panera
  • Sushi
  • Kamiya 86
  • Sushi Palace
  • Fancy Sushi (New place on atlantic)
  • La Nopalera
  • Moe's
  • Burrito Gallery
View ex14.c
for(; i < argc; i++) {
print_letters(argv[i]);
}
View flippit.rb
class Flippit
Fliptable = {
"a" => "\u{0250}",
"b" => "q",
"c" => "\u{0254}",
"d" => "p",
"e" => "\u{01DD}",
"f" => "\u{025F}",
"g" => "\u{0183}",
"h" => "\u{0265}",
View ab_test.sh
# curl "http://www.flippit.us/get_flipped" \
# -d 'string=blah' \
# -X 'POST' \
# -H "Content-Type: application/x-www-form-urlencoded" \
ab -n 1000 -c 3 -p data_file.txt -T 'application/x-www-form-urlencoded' http://www.flippit.us/get_flipped
View LCSubstring.rb
require 'rspec'
# function LCSubstr(S[1..m], T[1..n])
# L := array(1..m, 1..n)
# z := 0
# ret := {}
# for i := 1..m
# for j := 1..n
# if S[i] == T[j]
# if i == 1 or j == 1
# L[i,j] := 1
View test_module.rb
class Superclass
FIND_ME = "Found in superclass!"
end
# module ParentLexicalScope
# FIND_ME = "Found inside ParentLexicalScope"
# end
module ParentLexicalScope
FIND_ME = "Found inside ParentLexicalScope"