2009-02-27

Compilin SQLite from source code

This article is describe how to compile SQLite 3 from its source code scratch.

Steps

1. Setting current path as $TOP variable.
export TOP=`pwd`

2. Getting source code tarball from official web site, and save it to $TOP.
wget http://www.sqlite.org/sqlite-3.6.11.tar.gz -O $TOP/sqlite-3.6.11.tar.gz

3. Extracting
cd $TOP; gzip -dc sqlite-3.6.11.tar.gz | tar -xf - ; cd sqlite-3.6.11

4. Detecting something in system environment.
./configure

5. Executing make if previous step successful. Doing debug with err.txt if errors occurs during makeing.
make 1> /dev/null 2> err.txt

6. Installing files to system (/usr/local/), need root permission.
# make install

2009-02-13

tmux - terminal multiplexer

Install steps
1. Downloading all packages, assume you're in bash shell.
wget -c http://mentors.debian.net/debian/pool/main/t/tmux/tmux_0.5{-1.d{iff.gz,sc},.orig.tar.gz}


2. Unpacking and patch, then compie it.

$ gzip -d tmux_0.5-1.diff.gz
$ tar -zxf tmux_0.5.orig.tar.gz; cd tmux-0.5
$ patch -Np1 < ../tmux_0.5-1.diff
# make 1> /dev/null 2> err.txt && make install


3. Tuning it

.tmux.conf

set prefix ^\
set status on
set status-bg yellow
set status-fg block
set status-right " "


# For 0.7

unbind ^b
set -g prefix ^\
send-prefix
set -g status on
set -g status-bg yellow
set -g status-fg black
set -g utf8 off


.bashrc
alias t='tmux attach -d'



Drawbacks
under testing...

Really runs faster than GNU Screen!!

References
OSNews, Stayin' Alive with GNU Screen, http://osnews.com/comments/20962
mentors.debian.net, http://mentors.debian.net/debian/pool/main/t/tmux/

2009-02-12

SSH Tunnel memo

ssh -CND ${OUTDOOR_PORT} ${USER}@${REMOTE_SERVER}


Specifies a port ${OUTDOOR_PORT} forwarding (-D) to ${REMOTE_SERVER} with ${USER}, that without executing the remote commands (-N), and requests all data compressed (-C).


Firefox
Changing its SOCKS Host to localhost and Port to ${OUTDOOR_PORT}.

Opera
Installing the tsocks, do manipulate with links article.


References:
1. code in the ruins, Opera 9/SOCKS hack, http://code.mogrify.org/2006/07/05/opera-9socks-hack/
2. polishlinux.org, SSH Tunnels: Bypass (Almost) Any Firewall, http://polishlinux.org/apps/ssh-tunneling-to-bypass-corporate-firewalls/