Skip to content

Instantly share code, notes, and snippets.

Lucas Jenß x3ro

View GitHub Profile
View gist:1036778
* The Distribution type assumes works as follows:
* For any x Water Cells (._1) there are y Fishes (._2) and z Sharks (._3)
type Distribution = (Int, Int, Int)
* This object holds the Stream factory which
* is used to fill the Ocean with a given distribution.
* Needs the Ocean object to query an empty cell, but does
View gist:1043347
  • projekt
    • data (nicht im VCS)
      • typo3temp
      • uploads
      • fileadmin
    • src (im VCS)
      • typo3conf
      • resources
        • css
View gist:1043741
import scala.collection.mutable._
class Foo {
object Foo {
trait Transform[-A >: B, B, +R[_] <: Set[_]] {
def apply(a: A) : R[B]
View gist:1323308
ERLC = erlc -v +debug_info
SRC = src/
TARGET = bintest1/
DIRS = client/ server/ /
-mkdir $(TARGET);
View gist:1339281
set_neighbors([VeryFirst | [VerySecond | Tail]]) ->
set_neighbors([VeryFirst | [VerySecond | Tail]], VeryFirst, VerySecond).
set_neighbors([SecondToLast | [Last | []]], VeryFirst, VerySecond) -> % Only two elements left"L: ~p M: ~p R: ~p~n", [SecondToLast, Last, VeryFirst]),"L: ~p M: ~p~n", [Last, VeryFirst]),
log ! { "GGT Prozess (~p) über linken (~p) und rechten (~p) Nachbarn informiert~n", [Last, SecondToLast, VeryFirst] },
log ! { "GGT Prozess (~p) über linken (~p) und rechten (~p) Nachbarn informiert~n", [VeryFirst, Last, VerySecond] },
View gist:1387257
var produkteZuAngebot = (
from u in produkte
let produkt = Produktverwaltung.ProduktMitId(u.Key)
select new ProduktZuAngebot {Angebot = angebot, Menge = u.Value, Produkt = produkt}
angebot.ProduktAngebote = produkteZuAngebot;
View gist:1642916
#!/usr/bin/env python
# -*- coding: utf8 -*-
# T → g(b|c)d
import sys
parseInput = sys.argv[1]
View gist:1713601
from Queue import Queue
from Queue import Empty
import threading
import time
def queueGetNowait(queue):
return queue.get_nowait()
except Empty:
x3ro / gist:1917473
Created Feb 26, 2012
Weird PHP file-upload form behaviour
View gist:1917473
if( isset($_POST['submitted']) ) {
<!DOCTYPE html>
<title>PHP File Upload</title>
x3ro / net_http_debug.rb
Created May 2, 2012 — forked from kaiwren/net_http_debug.rb
Enable debug for all Ruby HTTP requests
View net_http_debug.rb
require 'net/http'
module Net
class HTTP
def self.enable_debug!
class << self
alias_method :__new__, :new
def new(*args, &blk)
instance = __new__(*args, &blk)
You can’t perform that action at this time.