Aleš Hakl adh

View gist:1491493
1 2 3 4 5 6 7 8 9 10
00000000 0c 63 6f 6d 70 61 63 74 2d 6c 69 73 74 03 0d 63 |.compact-list..c|
00000010 61 6e 6f 6e 2d 65 6e 76 2d 72 65 66 0e 64 66 73 |anon-env-ref.dfs|
00000020 63 68 25 69 6e 74 65 72 6e 61 6c 1a 25 64 65 66 |ch%internal.%def|
00000030 69 6e 65 2d 63 61 6e 6f 6e 69 63 61 6c 2d 63 6f |ine-canonical-co|
00000040 6e 73 74 61 6e 74 06 73 79 6d 62 6f 6c 0a 64 66 |nstant.symbol.df|
00000050 73 63 68 2d 75 73 65 72 09 66 61 63 74 6f 72 69 |sch-user.factori|
00000060 61 6c 7f 02 7e 7d 10 25 72 65 63 6c 6f 73 65 2d |al..~}.%reclose-|
00000070 63 6c 6f 73 75 72 65 11 73 74 61 6e 64 61 72 64 |closure.standard|
00000080 2d 66 75 6e 63 74 69 6f 6e 0b 6c 61 6d 62 64 61 |-function.lambda|
00000090 2d 6c 69 73 74 00 01 00 00 00 00 7c 7b 01 6e 7f |-list......|{.n.|
View gist:1461390
1 2 3 4 5 6 7 8 9 10
[689490.180010] vnet1: no IPv6 routers present
[769944.363808] php-fpm[8165]: segfault at 80e40 ip 082b109a sp bfe5d180 error 4 in php-fpm[8048000+3ae000]
[897417.111607] EXT3-fs error (device dm-0): ext3_free_blocks_sb: bit already cleared for block 459272
[897417.111671] Aborting journal on device dm-0.
[897417.152928] ext3_abort called.
[897417.152957] EXT3-fs error (device dm-0): ext3_journal_start_sb: Detected aborted journal
[897417.153013] Remounting filesystem read-only
[897417.184406] Remounting filesystem read-only
[897417.233282] EXT3-fs error (device dm-0) in ext3_free_blocks_sb: Journal has aborted
[897417.233348] EXT3-fs error (device dm-0) in ext3_free_blocks_sb: Journal has aborted
View gist:1366248
1 2 3 4 5 6 7 8 9 10
$ ./dfsch-repl
/\___/\ dfsch version 0.4.0-dev
( o o ) (rel-0.3.0-1219-g0ae9b2e) [Nov 15 2011 05:35:34]
== * == dfsch is free software, and you are welcome to redistribute it
) ( under certain conditions; see file COPYING for details.
 
]=> (car :mnau)
debugger invoked on type-error:
:mnau is not an instance of #<abstract-type 0x7ff0b410bae0 pair instance-size: 16>
:instance-suffices?: true
View gist:1219728
1 2 3
srcdirstrip=`echo ".." | sed 's/[].[^$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo ".." | sed 's/[].[^$\\*]/\\\\&/g'`; \
list='README ../m4/libtool.m4 ../m4/ltoptions.m4 ../m4/ltsugar.m4 ../m4/ltversion.m4 ../m4/lt~obsolete.m4 ../configure.ac ../aclocal.m4 dfsch/lib/threads.h dfsch/lib/os.h dfsch/lib/posix-regex.h dfsch/lib/inet.h dfsch/lib/cdebug.h dfsch/lib/cinspect.h dfsch/lib/console.h dfsch/lib/xml.h dfsch/lib/sxml.h dfsch/lib/shtml.h dfsch/lib/json.h dfsch/lib/socket-port.h dfsch/lib/http.h dfsch/lib/csv.h dfsch/lib/ini-file.h dfsch/lib/zlib.h dfsch/lib/tk-gui.h dfsch/lib/pcre.h dfsch/lib/crypto.h dfsch/lib/tokyo-cabinet.h dfsch/lib/tokyo-tyrant.h dfsch/lib/gd.h dfsch/lib/ffi.h dfsch/lib/curl.h dfsch/strings.h dfsch/defines.h dfsch/parse.h dfsch/hash.h dfsch/dfsch.h dfsch/types.h dfsch/number.h dfsch/magic.h dfsch/object.h dfsch/weak.h dfsch/format.h dfsch/ports.h dfsch/load.h dfsch/util.h dfsch/bignum.h dfsch/conditions.h dfsch/introspect.h dfsch/random.h dfsch/writer.h dfsch/eqhash.h dfsch/mkhash.h dfsch
View gist:979838
1 2 3 4 5 6 7 8 9 10
]=> (define (foo x)
..> (let ((x 0))
..> (lambda ()
..> (set! x (1+ x))
..> x)))
#<standard-function 0x15f30f0 foo(x)>
]=> (slot-ref foo :code)
((let ((x 0)) (lambda () (set! x (1+ x)) x)))
]=> (define quux (foo 12))
#<standard-function 0x165ff50 ()>
View gist:979488
1 2 3 4 5 6 7 8 9 10
0000000000030fb0 <dfsch__reclose_closure>:
30fb0: 48 89 6c 24 f0 mov %rbp,-0x10(%rsp)
30fb5: 48 89 5c 24 e8 mov %rbx,-0x18(%rsp)
30fba: 48 89 f5 mov %rsi,%rbp
30fbd: 4c 89 64 24 f8 mov %r12,-0x8(%rsp)
30fc2: 48 83 ec 18 sub $0x18,%rsp
30fc6: 48 85 ff test %rdi,%rdi
30fc9: 0f 84 9d 00 00 00 je 3106c <dfsch__reclose_closure+0xbc>
30fcf: 40 f6 c7 07 test $0x7,%dil
30fd3: 0f 85 87 00 00 00 jne 31060 <dfsch__reclose_closure+0xb0>
View gist:950666
1 2 3 4 5 6 7 8 9 10
/\___/\ dfsch version 0.4.0-dev
( o o ) (rel-0.3.0-937-g451e094) [May 1 2011 15:05:17]
== * == dfsch is free software, and you are welcome to redistribute it
) ( under certain conditions; see file COPYING for details.
]=> (define t (tokyo-cabinet:open-table "foo.tab"))
#<tokyo-cabinet:table 0x2206160 >
]=> (define (print-results idl)
..> (for-each (lambda (id) (write (collection->list (map-ref t id))) (newline)) idl))
#<standard-function 0x21e35f0 print-results(idl)>
]=> (define q (tokyo-cabinet:make-query t))
View gist:806333
1 2 3 4 5 6 7 8 9 10
#!/bin/bash
IPv4=`ip a | sed -n '/eth0/,$p' | grep '^[[:space:]]*inet' | head -n 1 | sed -r 's/^[[:space:]]*inet[[:space:]]+([[:digit:].]+).*$/\1/'`
prefix=` echo $IPv4 | tr '.' '\n' | sed '1iobase=16'| bc | sed 's/^.$/0\0/'| tr -d '\n' | sed 's/^..../\0:/'`
 
cat >/etc/radvd.conf << EOF
interface eth1
{
AdvSendAdvert on;
 
prefix 2002:$prefix:100::/64
View gist:714556
1 2 3 4 5 6 7 8 9 10
>>> def singleton(klass):
... inst = klass()
... return lambda:inst
...
>>> @singleton
... class Bar:
... pass
...
>>> Bar()
<__main__.Bar instance at 0x7fea76c054d0>
View gist:714552
1 2 3 4 5 6 7 8 9 10
Python 2.6.5+ (release26-maint, Jul 6 2010, 12:58:20)
[GCC 4.4.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> class Foo:
... def __call__(self):
... return self
...
>>> Foo()
<__main__.Foo instance at 0x7fea76c053f8>
>>> Foo()
Something went wrong with that request. Please try again.