Skip to content

Instantly share code, notes, and snippets.

@salzig
salzig / time.scala
Created April 25, 2012 08:48
Scala Time
package time
object App {
def main(args:Array[String]) {
import TimeImplicit._
println(10 ns)
println(20 µs)
println(30 ms)
println(40 s)
@salzig
salzig / gist:3636465
Created September 5, 2012 13:24
Oh why? O.o
> a = Hash.new(Hash.new(0))
=> {}
> a[DateTime.now.beginning_of_day]["abc"] = 13
=> 13
> a[DateTime.now.beginning_of_day]["abc"]
=> 13
> a[DateTime.now.beginning_of_day]
@salzig
salzig / caja.rb
Created November 6, 2012 17:21
Kleiner en/de-coder für Caja
# coding: utf-8
# Beispiel:
# > Caja.encode("Hallo Welt, es ist 13 Uhr")
# > Caja.decode(Caja.encode("Hallo Welt, es ist 13 Uhr"))
class Caja
@@table = {
"a" => "¥¥µ",
"h" => "þµ¥",
@salzig
salzig / DES.java
Created November 12, 2012 21:34
Finde den Fehler O.o
// Copyright (C) 1998-2001 Logi Ragnarsson
import java.util.Random;
/**
* This is the class for Data Encryption Standard (DES) keys. See FIPS PUB 46-1
* or DEA defined in ANSI X3.92-1981 for a complete specification.
*
* <p>
* DES is the most widely used block cipher, although it is nowadays normally
@salzig
salzig / README.md
Last active December 16, 2015 05:19
TideSDK 1.3.1 http://test262.ecmascript.org/ Example Application

TideSDK 1.3.1 http://test262.ecmascript.org/ Example Application

  • Start Application
  • Click on "Run"
  • Click on "Run" right next to "Chapter - ch15 (8075 tests)"
@salzig
salzig / _.md
Created May 22, 2013 09:58
minimal d3 area chart
@salzig
salzig / _.md
Created June 2, 2013 15:55
HAW - Next Media - Tile Rechnerei

Keybase proof

I hereby claim:

  • I am salzig on github.
  • I am salzig (https://keybase.io/salzig) on keybase.
  • I have a public key whose fingerprint is CD9D 2123 9FFA 5593 1E16 92F1 D770 F3C0 0283 C6AA

To claim this, I am signing this object:

@salzig
salzig / ipaddr.rb
Created April 9, 2014 15:02
Monkey Patch Ruby's stdlib IPAddr with netmask method
require 'ipaddr'
class IPAddr
# netmask to the people!
def netmask
_to_string(@mask_addr)
end
end
@salzig
salzig / # gcc -v
Created April 20, 2014 21:20
mapcrafter debug - ENV for m0r13
# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.6/lto-wrapper
Target: i686-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)