Skip to content

Instantly share code, notes, and snippets.

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)
input_size = 12
input_bandwith = 100
print "upload ",input_size," TB with ",input_bandwith,"mbit/s \n\n"
scale=1
kilo = 1024
mega = 1024 * kilo
giga = 1024 * mega
tera = 1024 * giga
@salzig
salzig / Person.java
Last active August 29, 2015 14:01
Person Class
class Person {
private String name;
public Person(String name) {
this.name = name;
}
public Person() {
this("Keks");
}
@salzig
salzig / selectionSort.erl
Created November 19, 2014 08:14
Was fehlt.....
%% aufruf um exemplarisch über "zahlen.dat" zu laufen
runSelectionSortExample() ->
StartTime = time(),
selectionSortOverFileLines("zahlen.dat").
%% Öffne Datei, und iteriere über die Tuple
selectionSortOverFileLines(Filename)
Tuples = file:consult(FileName),
selectionSortOverTuples(Tuples).
@salzig
salzig / config.ru
Created May 21, 2015 07:10
directory as itunes podcast experiment
#use Rack::Static, root: ''
feed = lambda { |env|
server = [env['SERVER_NAME'], env['SERVER_PORT']].compact.join(':')
# file = File.join(Dir.pwd,env['PATH_INFO'])
# if File.exist? file
# return [200, {'Content-Type'=>'video/quicktime', 'Content-Length'=>File.size(file).to_s}, [File.read(file)]]
# end
@salzig
salzig / Application.java
Created July 6, 2011 17:43
HAW - PRP2 - WS10 - Example Solution
package ws10;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
public class Application {
@salzig
salzig / Pruefung.java
Created July 7, 2011 11:36
Exampleexam 2011
package klausur;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
public class Pruefung {