Use the diff
code highlighting tag.
```diff
- foo
+ bar
Example:
def a l = def b; <<-NIGHTMARES; end; puts send l; end | |
😱😱😱 | |
NIGHTMARES | |
a |
language: elixir | |
elixir: | |
- 1.0.5 | |
otp_release: 17.3 | |
matrix: | |
include: | |
- elixir: 1.2 |
# Install quemu, docker, etc | |
yaourt -S qemu qemu-user-static binfmt-support | |
# The quemu-user-static AUR package is outdated and broken. The .deb package they pull is no longer in the ubuntu repository. | |
# Edit the PKGBUILD and use qemu-user-static_2.4+dfsg-3_amd64.deb (With SHA1 sum "84d83a16c60c82b6c579f2f750b04a3ac26c249b") | |
# Enable ARM emulation | |
update-binfmts --enable qemu-arm |
#!/bin/sh | |
# | |
# Forwards SSH agent into a Docker container running in the active | |
# docker-machine | |
# | |
PROGNAME=$(basename $0) | |
NAME=$(docker-machine active) |
defmodule CombinationsBenchmark do | |
def combinations(collection, k) do | |
List.last(do_combinations(collection, k)) | |
end | |
defp do_combinations(list, k) do | |
combinations_by_length = [[[]]|List.duplicate([], k)] | |
List.foldr list, combinations_by_length, fn x, next -> | |
sub = :lists.droplast(next) |
function component(fn){ | |
class C extends React.Component { | |
render(){ | |
return fn(this.props, this.context) | |
} | |
} | |
C.displayName = fn.displayName || fn.name | |
C.propTypes = fn.propTypes | |
C.contextTypes = fn.contextTypes | |
return C |
tell application "Spotlight" to inject SIMBL into Snow Leopard
#[link(name = "logger")] | |
extern { | |
fn CrystalLog(text: *const u8); | |
} | |
fn log(text: &'static str) { | |
unsafe{ CrystalLog(text.as_bytes().as_ptr()) }; | |
} | |
fn main() { |
def trace_calls_on | |
scope = {} | |
trace = TracePoint.new(:call, :line) do |tp| | |
case tp.event | |
when :call then puts "#{tp.path}:#{tp.lineno} #{tp.defined_class}::#{tp.method_id} " \ | |
"called from #{scope[:path]}:#{scope[:lineno]} #{scope[:class]}::#{scope[:method_id]}" | |
when :line then scope = { | |
event: :line, | |
lineno: tp.lineno, | |
path: tp.path, |