This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[pid 11671] <... select resumed> ) = 1 (in [4]) | |
[pid 11731] <... write resumed> ) = 8192 | |
[pid 11671] read(4, "L\273q\f*\306\3353\17\337sCd\206/\321[\276M\320Gy\374\372\373\236\304\207,\323Y\271"..., 16384) = 16384 | |
[pid 11731] write(1, "\317g\335\351\334\357\242c\264\r\303\204\367\377]\20\371\263:\327\22%}\343\355,n<\276\314\322\305"..., 8192 <unfinished ...> | |
[pid 11671] select(7, [3 4], [3], NULL, NULL <unfinished ...> | |
[pid 11731] <... write resumed> ) = 8192 | |
[pid 11671] <... select resumed> ) = 1 (in [4]) | |
[pid 11671] read(4, "i#\264Sg\244$\276\2&+\362\360\n@\354\276\240\310\363\237\304y\301\0g\321\266\2\244\272N"..., 16384) = 16384 | |
[pid 11731] write(1, "\255fM\324\t[\256w\254\247\306\261\221*\267\32*\355Z\305^_D\213\260\341^\375!\232\rF"..., 8192 <unfinished ...> | |
[pid 11671] mremap(0x7f74db754000, 2068480, 2101248, MREMAP_MAYMOVE <unfinished ...> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export G_SLICE=always-malloc | |
export G_DEBUG=gc-friendly | |
valgrind --tool=memcheck --leak-check=full --leak-resolution=high --num-callers=20 "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
tmp=`tempfile` | |
composite -compose difference "$1" "$2" "$tmp"; | |
evince "$tmp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I found this already described in: | |
# Comprehensions in a class definition mostly cannot access class variable | |
# [ http://bugs.python.org/issue11796 ] | |
# ...and my understanding is that this is not going to be fixed. | |
class Foo1: | |
def foo(i): return i | |
bar = (foo(i) for i in range(10)) | |
print(Foo1.bar) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from functools import partial | |
(lambda x: x*2)((lambda y: y+3)(2)) | |
(lambda x: 5)(10) | |
(lambda x:(lambda y:x+3*y))(12)(4) | |
def church2num(church): | |
try: return church(lambda x: x+1, 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! PrintMode(mode) | |
if &showmode | |
echoh ModeMsg | echo a:mode | echohl None | |
redraw | |
endif | |
endfunction | |
function! ResizeMode() | |
while 1 | |
call PrintMode('-- RESIZE --') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vim: ft=make | |
TEX = platex | |
.SUFFIXES: .tex .dvi | |
.tex.dvi: | |
nkf -e $< | $(TEX) -no-parse-first-line -interaction=nonstopmode -shell-escape -jobname=$(basename $< .tex) /dev/stdin | |
nkf -e $< | $(TEX) -no-parse-first-line -interaction=nonstopmode -shell-escape -jobname=$(basename $< .tex) /dev/stdin | |
# .SUFFIXES: .dvi .pdf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
grep 'ant\|bee\|cat\|dog\|emu' /etc/hosts | while read ip host; do | |
nc -w 1 -z "$ip" 22 > /dev/null && echo "$host" & | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ $# -lt 1 ]; then | |
echo "Usage: $0 (darkness in 0.0 - 1.0)" 1>&2 | |
fi | |
tmpfile=`mktemp` | |
gnome-terminal --save-config="$tmpfile" | |
profile=`grep "^ProfileID=" "$tmpfile" | cut -c 11-` | |
rm -f "$tmpfile" |
NewerOlder