Skip to content

Instantly share code, notes, and snippets.

@hmaurer
hmaurer / README.markdown
Created December 30, 2015 11:42 — forked from terlar/README.markdown
ArchLinux on Mac Book Retina 13"
@hmaurer
hmaurer / 32.asm
Created December 27, 2015 23:15 — forked from FiloSottile/32.asm
NASM Hello World for x86 and x86_64 Intel Mac OS X (get yourself an updated nasm with brew)
; /usr/local/bin/nasm -f macho 32.asm && ld -macosx_version_min 10.7.0 -o 32 32.o && ./32
global start
section .text
start:
push dword msg.len
push dword msg
push dword 1
mov eax, 4
@hmaurer
hmaurer / tmux-cheatsheet.markdown
Created September 30, 2015 22:11 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
{
"chat": {
// the list of chats may not be listed (no .read permissions here)
// a chat conversation
"$key": {
// if the chat hasn't been created yet, we allow read so there is a way
// to check this and create it; if it already exists, then authenticated
// user (specified by auth.id) must be in $key/users
public function __construct(WestcottInterface $api){
//Before filters
$this->beforeFilter('check_roles', array('except' => array('getLogin','postLogin','getLogout')));
$this->beforeFilter('csrf', array('on' => 'post'));
@hmaurer
hmaurer / a3gis.purs
Last active August 29, 2015 14:13 — forked from joneshf/a3gis.purs
module A3gis where
import Data.Traversable
import Data.Map
import Data.Maybe
foo :: forall k v. (Eq v, Ord k) => Map k v -> Map k v -> Maybe (Map k v)
foo m1 m2 = sequence $ unionWith go (Just <$> m1) (Just <$> m2)
where
go x y = if x == y then x else Nothing
@hmaurer
hmaurer / groups.p6
Last active August 29, 2015 14:07 — forked from masak/groups.p6
role Group {
method elements { ... }
method id { ... }
method op($l, $r) { ... }
}
macro assert($fact) {
quasi {
die "FAILED: ", $fact.Str
unless {{{$fact}}};
require 'tire'
require 'nobrainer'
NoBrainer.connect 'rethinkdb://server/company'
class Employee
include NoBrainer::Document
field :name
field :title

This is my recommended path for learning Haskell.

Something to keep in mind: don't sweat the stuff you don't understand immediately. Just keep moving.

Primary course

Installing Haskell

Ubuntu PPA

module Printf
%default total
data Format = FInt Format -- %d
| FString Format -- %s
| FOther Char Format -- [a-zA-Z0-9]
| FEnd --
format : List Char -> Format