Author: Gugu Ncube
-
Kyoto Cabinet – Performance Tests using python
Install Kyoto Cabinet # http://torum.net/2010/01/kyotocabinet-alpha-release/ ulimit -u unlimited #zlib compression sudo apt-get install -y zlib1g-dev build-essential #lzma compression sudo apt-get install -y lzma liblzma-dev #lzo compression sudo apt-get install -y liblzo2-dev sudo apt-get remove -y libtokyocabinet-dbg libtokyocabinet-dev tokyocabinet-bin libtokyocabinet9 sudo apt-get install -y xz-utils #lua sudo apt-get remove -y lua5.2 liblua5.2-0 liblua5.2-0-dbg liblua5.2-dev sudo apt-get…
-
RocksDB – Installation and Performance Tests
RocksDB is a low-latency embedded key value database created by Facebook engineers. It is based on the LevelDB which was created by Google Engineers Jeffrey Dean and Sanjay Ghemawat. According the rocksdb website, it offers the following advantages compared to LevelDB: – much better performance for databases larger than RAM – great performance for IO…
-
Unix – Permanent SSH Tunnel – The easy way 🙂
OK, this is a dead easy instruction of setting up a permanent ssh tunnel through cron This establishes port forwarding to a remote server. Command crontab -e nc -z localhost || ssh @ -N -L :: & Example * * * * * nc -z localhost 15432 || ssh a@big-bad-server.net -N -L 15432:10.0.80.1:5432 -L 25432:10.0.80.2:5432…
-
SED – Custom Separators – Dealing with Filepaths
a@t400:~$ echo “hello”| sed -e ‘s/e/ö/g’ höllo a@t400:~$ echo “hello”| sed -e ‘s#e#ö#g’ höllo a@t400:~$ echo “hello”| sed -e ‘s^e^ö^g’ höllo References http://backreference.org/2010/02/20/using-different-delimiters-in-sed/
-
Postgres – Export a Table to CVS File
# In the postgres console or pgAdmin #-h: host #-p: port #-U: database user #-d: database name psql -h 127.0.0.1 -p 5432 -U database_user -d database_name \COPY (SELECT * FROM mytable) TO E’/home/a/data/export.csv’ CSV DELIMITER ‘,’; One Liner from the command line # CSV psql -h 127.0.0.1 -p 5432 -U database_user -d database_name -c “COPY…
-
Ubuntu – XnView – Installation – image viewer
XnView is a great image viewer popular under Windows and now available in Ubuntu 🙂 mkdir -p ~/build/xnview cd ~/build/xnview wget http://download.xnview.com/XnViewMP-linux-x64.deb sudo dpkg -i XnViewMP-linux-x64.deb sudo apt-get install -f References 1. XnView Home 2. http://download.xnview.com/
-
Ubuntu – Linux Process Explorer – GUI – Installation
A process monitoring tool which looks like Sysinternals Process Explorer # download directory mkdir -p ~/build/process-explorer cd ~/build/process-explorer # download wget http://optimate.dl.sourceforge.net/project/procexp/bin_v1/procexp_1.5.275-0ubuntu1_all.deb # install dependancies sudo apt-get install -y python-configobj # install process explorer sudo dpkg -i procexp_1.5.275-0ubuntu1_all.deb # start sudo /bin/sh /usr/bin/procexp.sh # => more errors, doesn’t work # => aaargh, i give up!…
-
Ubuntu – Installation of Great Little Radio Player
# install dependencies – gstreamer sudo add-apt-repository -y ppa:gstreamer-developers/ppa sudo apt-get update sudo apt-get install -y gstreamer1.0* sudo apt-get install -y libgstreamer* #sudo apt-get install -y libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev # download #wget http://downloads.sourceforge.net/project/glrp/v1.4.4/greatlittleradioplayer_1.4.4_i386.deb wget http://downloads.sourceforge.net/project/glrp/v1.4.4/greatlittleradioplayer_1.4.4_amd64.deb # install sudo dpkg -i greatlittleradioplayer_1.4.4_amd64.deb # start greatlittleradioplayer References 1. http://linuxg.net/how-to-install-great-little-radio-player-1-4-4-on-ubuntu-linux-mint-debian-and-derivates/ 2. http://ubuntuguide.org/wiki/Ubuntu_Precise_Media_Players 2. http://superuser.com/questions/124943/how-can-i-resolve-gstreamer-dependencies-in-ubuntu
-
Ubuntu – 64 bits or 32 bits – Determine the Computer Architecture using bash in the terminal
Using a bash function to determine the CPU architecture: amd64 or i386, x86_64 or i386 function os_cpu_bits() { if uname -a | grep “x86_64” 1> /dev/null then echo “amd64” elif uname -a | grep “i386” 1> /dev/null then echo “i386” else echo “unknown” fi } architecture=$(os_cpu_bits) echo “$architecture” # amd64 References 1. http://askubuntu.com/questions/41332/how-do-i-check-if-i-have-a-32-bit-or-a-64-bit-os 2. http://www.linuxjournal.com/content/return-values-bash-functions
-
Xfce – Configuration and Tweaks – Getting Started
1. application menu display Application menu (right click) -> Uncheck “Show Button title” 2. Terminal Color not visible Application menu -> Terminal Emulation Edit-> Profile preferences -> Colors uncheck : “Use colors from system theme” Build in Schemes like “White on black” Or select custom Text color and background 3. remove silly scrollbars sudo add-apt-repository…