Skip to content

Instantly share code, notes, and snippets.

View rintaun's full-sized avatar

Matthew Lanigan rintaun

View GitHub Profile
/home/rintaun/.rvm/gems/ruby-2.0.0-p0/gems/sinatra-assetpack-0.2.2/lib/sinatra/assetpack/buster_helpers.rb:8: [BUG] Segmentation fault
ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:0077 p:---- s:0382 e:000381 CFUNC :join
c:0076 p:0037 s:0379 e:000377 METHOD /home/rintaun/.rvm/gems/ruby-2.0.0-p0/gems/sinatra-assetpack-0.2.2/lib/sinatra/assetpack/buster_helpers.rb:8
c:0075 p:0009 s:0373 e:000372 METHOD /home/rintaun/.rvm/gems/ruby-2.0.0-p0/gems/sinatra-assetpack-0.2.2/lib/sinatra/assetpack/buster_helpers.rb:25
c:0074 p:0011 s:0367 e:000366 BLOCK /home/rintaun/.rvm/gems/ruby-2.0.0-p0/gems/sinatra-assetpack-0.2.2/lib/sinatra/assetpack/package.rb:65 [FINISH]
c:0073 p:---- s:0363 e:000362 IFUNC
c:0072 p:---- s:0361 e:000360 CFUNC :each
@rintaun
rintaun / dump
Created May 3, 2013 19:00 — forked from anonymous/dump
-- Control frame information -----------------------------------------------
c:0087 p:---- s:0449 e:000448 CFUNC :read
c:0086 p:0041 s:0445 e:000444 BLOCK /home/rintaun/.rvm/gems/ruby-2.0.0-p0@myce/gems/sinatra-assetpack-0.2.2/lib/sinatra/assetpack/buster_helpers.rb:7 [FINISH]
c:0085 p:---- s:0442 e:000441 CFUNC :map
c:0084 p:0010 s:0439 e:000438 METHOD /home/rintaun/.rvm/gems/ruby-2.0.0-p0@myce/gems/sinatra-assetpack-0.2.2/lib/sinatra/assetpack/buster_helpers.rb:7
c:0083 p:0009 s:0434 e:000433 METHOD /home/rintaun/.rvm/gems/ruby-2.0.0-p0@myce/gems/sinatra-assetpack-0.2.2/lib/sinatra/assetpack/buster_helpers.rb:25
c:0082 p:0011 s:0428 e:000427 BLOCK /home/rintaun/.rvm/gems/ruby-2.0.0-p0@myce/gems/sinatra-assetpack-0.2.2/lib/sinatra/assetpack/package.rb:65 [FINISH]
c:0081 p:---- s:0424 e:000423 IFUNC
c:0080 p:---- s:0422 e:000421 CFUNC :each
c:0079 p:---- s:0420 e:000419 CFUNC :map
append = function(el, list) {
if (is_empty(list)) {
return prepend(el, list);
} else {
return prepend(head(list), append(el, tail(list)));
}
};
last = function(list) {
if (is_empty(tail(list))) {
head = ->(list) { list.call {|h, _, _| h } }
tail = ->(list) { list.call {|_, t, _| t } }
is_empty = ->(list) { list.call {|_, _, e| e } }
empty = ->(&selector) do
selector[nil, nil, true]
end
prepend = ->(el, list) do
->(&selector) { selector[el, list, false] }
@rintaun
rintaun / lists.php
Last active December 16, 2015 13:49
<?php
$empty = function($selector) {
return $selector(null, null, true);
};
$prepend = function($el, $list) {
return function($selector) use ($el, $list) {
return $selector($el, $list, false);
};
};
@rintaun
rintaun / lists.hs
Last active December 16, 2015 13:49
let empty selector = selector True True True
let prepend el list = \selector -> selector el list False
let head list = list (\h t e -> h)
let tail list = list (\h t e -> t)
let is_empty list = list (\h t e -> e)
require 'rspec/core/example_group'
require 'rspec/core/metadata'
require 'rspec/core/formatters/progress_formatter'
class RealEnglishFormatter < RSpec::Core::Formatters::ProgressFormatter
module ::RSpec
module Core
class ExampleGroup
def self.context(*args, &example_group_block)
o = self.describe *args, &example_group_block
o.metadata[:example_group][:type] = :context
define([
'ember',
'template!templates/application.hbs'
], function(Ember) {
var MyApp = Ember.Application.create();
return MyApp;
});
DB.transaction do # BEGIN;
User.new do |user|
user.name = 'rintaun'
user.password = 'somebullshit' # I use this for all my passwords. Oh no! Now you know! D:
user.save # INSERT;
end
User.new do |user|
user.name = 'rintaun' # this is a unique column, so this whole thing will obviously fail!
user.password = 'areallysecurepassword'
user.save # INSERT; -- Error
+---------------+
| organizations |
+---------------+
+------>| id(PK) |<---------+
| +---------------+ |
| |
| +--------+ +----------+ |
| | groups | | profiles | |
| +--------+ +----------+ |
+---| org_id | | org_id |---+