Skip to content

Instantly share code, notes, and snippets.

View booo's full-sized avatar

Philipp Borgers booo

View GitHub Profile
@booo
booo / checklist_rj45.md
Last active June 9, 2016 13:58
rj45 stecker crimpen

RJ45 Stecker crimpen

Material

  • Hirose TM31 Stecker
  • Hirose TM31 Einfädelhilfe
  • Hirose TM31 Knickschutz
  • Netzwerkkabel

Werkzeug

@booo
booo / txt
Created January 26, 2016 22:29
dns problem rhxb-rt1
root@rhxb-rt1:~# time nslookup spline.de
Server: 127.0.0.1
Address 1: 127.0.0.1 localhost
Name: spline.de
Address 1: 2001:6f8:1c3c:babe::71:1
Address 2: 130.133.110.71 vm-staticweb.spline.inf.fu-berlin.de
real 0m 20.29s
user 0m 0.00s
sys 0m 0.00s
@booo
booo / bar
Created January 6, 2014 20:15
..
Calibrating delay loop... OK.
Found chipset "Intel ICH7M". Enabling flash write... OK.
Found flash chip "MX25L1605" (2048 kB, SPI) at physical address 0xffe00000.
Found flash chip "MX25L1605A/MX25L1606E" (2048 kB, SPI) at physical address 0xffe00000.
Found flash chip "MX25L1605D/MX25L1608D" (2048 kB, SPI) at physical address 0xffe00000.
Multiple flash chip definitions match the detected chip(s): "MX25L1605",
"MX25L1605A/MX25L1606E", "MX25L1605D/MX25L1608D"
Please specify which chip definition to use with the -c <chipname> option.
root@x60s:~/flashrom# ./flashrom -p internal -c MX25L1605 -w /root/corboot/build/coreboot.rom
opkg update
opkg install luci-app-statistics collectd-mod-olsrd olsrd-mod-txtinfo \
collectd-mod-network
echo "
config 'statistics' 'collectd_network'
option 'enable' '1'
config 'collectd_network_server'
option 'host' 'monitor.berlin.freifunk.net'" >> /etc/config/luci_statistics
ip_add:
ip a a 104.204.0.46/28 dev ens2
ip_del:
ip a d 104.204.0.46/28 dev ens2
ip_route_add:
ip r a 104.204.0.48/30 via 104.204.0.33
ip r a 104.204.0.52/30 via 104.204.0.33
ip r a 104.204.0.56/30 via 104.204.0.34
import java.util.ArrayList;
import java.util.List;
import java.lang.StringBuffer;
public class Foo {
public static void main(String[] args) {
List<StringBuffer> list = new ArrayList<StringBuffer>();
list.add(new StringBuffer("foo"));
System.out.println(list.get(0));
list.get(0).append("bar");
@booo
booo / regip.sh
Last active December 19, 2015 07:59
#!/bin/sh
if [ "$#" -lt "7" ]; then
echo "usage: $0 <user> <password>" \
"<network 104.13.9> <range start> <range end> <plz> <description>"
exit 1
fi
# Postleitzahl, Beschreibung
plz="$6"
_rev=$(curl "http://openwifimap.net/openwifimap/$1" \
| python -c 'import json,sys;print(json.load(sys.stdin)["_rev"])')
curl -X DELETE "http://openwifimap.net/openwifimap/$1?rev=$_rev"
config defaults
option syn_flood '1'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
option drop_invalid '0'
config zone
option name 'lan'
import Data.List
data STree a = Empty | Node (STree a) a (STree a)
deriving (Eq, Ord, Show)
bft :: [STree a] -> [[a]]
bft = unfoldr f
where f x = case x of
[] -> Nothing