Wednesday, November 21, 2012

Verbose kernel compile output in openwrt:

include/kernel-build.mk:
KERNEL_MAKEOPTS V=1

Tuesday, November 20, 2012

Log in to remote systems without password:

cat .ssh/id_rsa.pub
[copy]
log in to remote system
mkdir .ssh
chmod 700 .ssh
cat >> .ssh/authorized_keys2
[paste]
Ctrl+D

Sunday, November 18, 2012

Brasero in squeeze doesn't correctly write archives to CD/DVD. Workaround:

genisoimage -o all.iso all.tar

Friday, November 16, 2012

Browser proxy settings to use tor on openwrt:

SOCKS proxy: 192.168.1.1:9050
Split one multi-patch file into many files, one file per patch (file paths in patch must not use spaces):

perl -ne 'BEGIN{$c=1}if(m!diff -urN.* [^/]+/(.*)!){($x=$1)=~s!/!_!g;close F;open F,">",sprintf("%03d-",$c).$x.".patch";$c++}print F' mult-patch-filename.patch

Wednesday, November 7, 2012

In git, if part of a file is staged and part is unstaged, commit only staged changes:

cp file file.unstaged 
git co file 
git ci file 
mv file.unstaged file