Skip to content

Instantly share code, notes, and snippets.

View romac's full-sized avatar
🔮
λ

Romain Ruetschi romac

🔮
λ
View GitHub Profile

Keybase proof

I hereby claim:

  • I am romac on github.
  • I am romac (https://keybase.io/romac) on keybase.
  • I have a public key whose fingerprint is 4162 43FC 0262 ED5F CA4A 6887 3095 CED8 87F2 A01A

To claim this, I am signing this object:

# http://stackoverflow.com/a/9912727
# Code:
#
namespace = (target, name, block) ->
[target, name, block] = [(if typeof exports isnt 'undefined' then exports else window), arguments...] if arguments.length < 3
top = target
target = target[item] or= {} for item in name.split '.'
block target, top
@romac
romac / DFA.hs
Last active December 15, 2020 15:46
Deterministic finite automaton in Haskell.
{-# LANGUAGE ExistentialQuantification #-}
module DFA (
DFA,
runDFA,
scanDFA,
isAccepting,
) where
import Data.Set (Set)
/usr/local/share/npm/lib
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ └─┬ [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
@media only screen and (min--moz-device-pixel-ratio: 1.5),
(-o-min-device-pixel-ratio: 3/2),
(-webkit-min-device-pixel-ratio: 1.5),
(min-device-pixel-ratio: 1.5) {
#my-image {
background:url(high.png);
}
}
@romac
romac / Makefile
Last active December 22, 2015 01:39
foo: main.o foo.o
clang -o $@ $^
%.o: %.c
clang -o $@ -c $^
%.o: %.s
yasm -f macho64 -o $@ $^
clean:
@romac
romac / LICENSE
Last active December 21, 2015 14:09
A Wordpress plugin that integrates Advanced Search By My Solr Server with WPML. This plugin adds the language code of the document about to be stored in Solr to it, and filter search results by the current language.
Copyright (c) 2013 kryzalid.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
int main( int argc, char * argv[] )
{
unsigned char code[] = "happy birthday";
void * mem = mmap(
Night time is really the best time to work. All the ideas are there to be yours because everyone else is asleep.
— Catherine O'Hara
@romac
romac / robot.js
Created December 4, 2012 22:30 — forked from S3Mi/robot.js
Dupazaur
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead(100);
robot.rotateCannon(360);
robot.back(100);