Skip to content

Instantly share code, notes, and snippets.

View heyLu's full-sized avatar

Luna Stadler heyLu

  • Leipzig
  • 17:19 (UTC +02:00)
View GitHub Profile
@heyLu
heyLu / couchdb.log
Created October 4, 2011 21:38
CouchDB child_undefined log
[Tue, 04 Oct 2011 21:49:42 GMT] [info] [<0.2327.0>] 127.0.0.1 - - 'POST' /_replicate 400
[Tue, 04 Oct 2011 21:49:57 GMT] [info] [<0.2471.0>] 127.0.0.1 - - 'HEAD' /log/ 200
[Tue, 04 Oct 2011 21:49:58 GMT] [info] [<0.2470.0>] 127.0.0.1 - - 'GET' /log/ 200
[Tue, 04 Oct 2011 21:49:59 GMT] [info] [<0.2481.0>] 127.0.0.1 - - 'GET' /log/_local/8363003659586c06c5b61184bb4cca31 404
[Tue, 04 Oct 2011 21:49:59 GMT] [info] [<0.2487.0>] 127.0.0.1 - - 'GET' /log/_local/747016ec6f08088947198794c2837320 404
[Tue, 04 Oct 2011 21:50:00 GMT] [info] [<0.2493.0>] 127.0.0.1 - - 'GET' /log/_changes?style=all_docs&heartbeat=10000&since=0&feed=normal 200
[Tue, 04 Oct 2011 21:50:00 GMT] [info] [<0.2464.0>] starting new replication "8363003659586c06c5b61184bb4cca31" at <0.2482.0>
[Tue, 04 Oct 2011 21:50:01 GMT] [error] [<0.2522.0>] ** Generic server <0.2522.0> terminating
** Last message in was {'EXIT',<0.2523.0>,{target_error,<<"forbidden">>}}
** When Server state == {state,nil,nil,<0.2482.0>,false,0,
@heyLu
heyLu / whoopey.rb
Created October 5, 2011 18:17
Overriding Hash#[] from a module
# So, this version is not at all mine, it's one from @samuelkadolph.
# (Just for the record.)
class MyHash < Hash
def initialize(hash = {})
super()
merge!(hash) if hash
end
def [](key)
@heyLu
heyLu / Hashtags.hs
Created November 21, 2011 19:37
hashtags in Haskell
import Data.Char (isAlpha)
import Text.Parsec
-- | Parses exactly one hashtag (and nothing else).
hashtag = do
char '#'
many letter
-- | Parse hashtags from a string (see the previous version for
-- a list-based version).
@heyLu
heyLu / hashtags.opa
Created November 21, 2011 19:50
Trying to parse hashtags in Opa
import stdlib.core.parser
rec tag_parser = parser
[#] tag=[a-zA-Z]+ tags=tag_parser -> [tag | tags]
| [^#]* tags=tag_parser -> tags
| Rule.eos -> []
@heyLu
heyLu / debug.log
Created November 26, 2011 12:15
debug.log for aquaria on linux (64bit)
/home/lu/t/games/Aquaria
DSQ init
Mipmaps Enabled
DeveloperKeys Disabled
VoiceOvers Enabled
Init Graphics Library...
setting vsync: 1
Video Driver Name [x11]
virtual(1067, 600)
virtual(1067, 600)
@heyLu
heyLu / dmesg.log
Created December 21, 2011 15:18
nouveau + resume + OpenGL crashing
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 3.2.0-rc5+ (lu@papill0n) (gcc version 4.6.2 20111125 (prerelease) (GCC) ) #4 SMP Wed Dec 21 15:30:57 CET 2011
[ 0.000000] Command line: root=/dev/sda6 ro
[ 0.000000] Disabled fast string operations
[ 0.000000] BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
[ 0.000000] BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
[ 0.000000] BIOS-e820: 00000000000e2000 - 0000000000100000 (reserved)
[ 0.000000] BIOS-e820: 0000000000100000 - 000000006ff90000 (usable)
@heyLu
heyLu / jsomp_mvc.java
Created April 18, 2012 11:52
jSOMP: Alternative MVC architecture
package jsomp.example.mvc;
/*
* A MVC example not using reflection in the controller.
*/
interface Machine {
String getName();
void setName(String name);
package dp;
interface Tree<K> {
int leaves();
}
class Branch<K> implements Tree<K> {
final Tree<K> left, right;
Branch(Tree<K> left, Tree<K> right) {
@heyLu
heyLu / oh_circles.coffee
Created May 6, 2012 18:20
Oh, circles! :)
class Vector
constructor: (p1, p2) ->
console.log "Vector: Warning", p1, p2 unless p1? and p2?
@x = p2.x - p1.x
@y = p2.y - p1.y
@random: (p1 = { x: 0, y: 0}, p2 = { x: window.innerWidth * 0.01, y: window.innerHeight * 0.01}) ->
flippy = (n) -> if Math.random() < 0.5 then -1 else 1
new Vector p1, { x: flippy(p2.x), y: flippy(p2.y)}
@heyLu
heyLu / ThreadBleh.java
Created May 27, 2012 12:01
Threads and stopping.
class ThreadBleh extends Thread {
private boolean areWePlayingNow = false;
public void run() {
while(true) {
if(areWePlayingNow) {
// do something
} else {
// don't do something ;)
}