Skip to content

Instantly share code, notes, and snippets.

View altitude's full-sized avatar

Clément Salaün altitude

View GitHub Profile
Foo
A
e -> B
B
e -> A
Bar
C
e -> D
D
openapi: 3.0.0
info:
title: Goldilocks HTTP API
version: 1.0.0-alpha
components:
schemas:
reference:
case File.read '/tmp/foo.txt' do
{:ok, content} -> IO.puts content
{:error, error} -> IO.inspect error
end
Running Steam on ubuntu 14.04 64-bit
STEAM_RUNTIME is enabled automatically
Installing breakpad exception handler for appid(steam)/version(1416617579)
Installing breakpad exception handler for appid(steam)/version(1416617579)
Installing breakpad exception handler for appid(steam)/version(1416617579)
Gtk-Message: Failed to load module "overlay-scrollbar"
Gtk-Message: Failed to load module "unity-gtk-module"
Gtk-Message: Failed to load module "overlay-scrollbar"
Gtk-Message: Failed to load module "unity-gtk-module"
Installing breakpad exception handler for appid(steamwebhelper)/version(20141121162341)
@altitude
altitude / gist:43b00d902150be06aefe
Last active August 29, 2015 14:01
Alternative notation with JS
function echo(something){
console.log(something);
return echo;
}
(echo ("hello world") ("i'm feeling lispy today") ("so i put parenthesis everywhere"))
@altitude
altitude / prefix.rb
Last active August 29, 2015 14:00
Ruby Prefix Notation Parser
class Prefix
def initialize
@expression_regex = /\([\w+*\-]+ (\w+ ?)+\)/
@operators = {}
@operators["+"] = lambda {|args| return args.map{|x| x.to_i}.inject(:+) }
@operators["*"] = lambda {|args| return args.map{|x| x.to_i}.inject(:*) }
@operators["-"] = lambda {|args| return args.map{|x| x.to_i}.inject(:-) }
end
<html>
<head>
<meta charset="utf-8">
<title>Stripe</title>
<style type="text/css">
html, body{
width: 100%;
height: 100%;
margin:0;
padding: 0;
;; INIT : string * int * int * int -> proc
(define INIT (lambda (diskname disksize cachesize)
(begin
(fs-make-disk diskname disksize)
(fs-init-cache cachesize)
(fs-init-dcache)
(fs-format-disk diskname disksize)
)))