This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Line width nags | |
hi OverLength ctermbg=red ctermfg=white | |
let line_width_nag=0 | |
function! ToggleLineWidthNags() | |
if g:line_width_nag==0 | |
match OverLength /\%80v.\+/ | |
let g:line_width_nag=1 | |
else | |
match OverLength // | |
let g:line_width_nag=0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
=begin lit | |
# Introducing Lit | |
Lit allows developers to embed Markdown in their comments, and extracts | |
it for them to produce human friendly documentation. | |
=end | |
require 'rubygems' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Demo</title> | |
</head> | |
<body> | |
<h1>PHP Mongo Test</h1> | |
<?php | |
try { | |
$connect = $_ENV["MONGOLAB_URI"]; | |
$m = new Mongo($connect); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Action < Struct.new(:action) | |
def initialize(&block) | |
super block | |
end | |
def call | |
action.call | |
end | |
def seq(rhs) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'llvm/core' | |
require 'llvm/execution_engine' | |
require 'llvm/transforms/scalar' | |
LLVM.init_x86 | |
mod = LLVM::Module.new("Function Pointers") | |
F = LLVM::Function([LLVM::Int], LLVM::Int) | |
FP = LLVM::Pointer(F) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NoMethodError (You have a nil object when you didn't expect it! | |
You might have expected an instance of ActiveRecord::Base. | |
The error occurred while evaluating nil.[]): | |
lib/heap_dump/dumped_lookup_table.rb:7:in `each' | |
lib/heap_dump/dumped_module.rb:38:in `find_class' | |
lib/heap_dump/decoder.rb:166:in `decode' | |
lib/read_dump.rb:23:in `initialize' | |
lib/read_dump.rb:32:in `session' | |
app/controllers/heap_viewer_controller.rb:5:in `show' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
irb(main):028:0> Complex(-1,1).real == -1 | |
=> true | |
irb(main):029:0> -1 ** 0 | |
=> -1 | |
irb(main):030:0> Complex(-1,1).real ** 0 | |
=> 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Int | |
attr_reader :value | |
def initialize(value) | |
@value = value | |
end | |
def accept(visitor, *data) | |
visitor.visit_int(self, *data) | |
end | |
def fold(rules) | |
rules[Int].call(value) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; ModuleID = 'Siren' | |
%0 = type { float, float, float, float, float } | |
declare float @powf(float, float) | |
declare float @sinf(float) | |
declare float @cosf(float) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
undefined method `taint!' on an instance of Hash. | |
kernel/delta/kernel.rb:85:in `taint! (method_missing)' | |
kernel/common/hash.rb:555:in `reject' |