gitosis: how to add new repository
I assume that you already have your gitosis-admin repository working (this is described elsewhere).cd gitosis-admin && git pull – enter your gitosis administrative repository and ensure it is...
View ArticleIntel i915 integrated graphics under Debian: how to get rid of sluggish 2D...
I assume you already have configured and working desktop environment, but want to improve performance.First of all, sudo aptitude install mesa-utils. Then run in a Terminal/Konsole glxgears, and wait...
View ArticleHow to create custom Affymetrix CDF file
First, learn about custom CDFs and why they are needed.The aroma.affymetrix R package google group has a how-to: create a CDF annotation file from scratch.Also useful: how to convert CDF into an R...
View ArticleLinux: how to remove trailing ^M (carriage return)
Imagine you have some styles.css transferred from Win machine to Linux via FTP in binary mode instead of ASCII mode; thencat styles.css | tr -d "\r" > styles-nocarriage.csswill create...
View ArticleUsing FTP usernames with @-symbol in midnight commander
MC is a console file manager. It supports FTP connections, and in my experience is faster in FTP than both Krusader and Gnome Commander.However, the default FTP connection format string...
View ArticleSQL injection walkthrough
SecuriTeam has an old, but still very useful article on SQL injection.I’ve created a PDF of that article, containing some of the comments (all the ‘thank-you’ and ‘help-me-hack’ comments were removed):...
View ArticleBest method to recursively chmod/process files or directories
Found here.Recursively set directories only to drwx-rx-rx (755):find . -type d -exec chmod 755 {} \;Recursively set files only to rwx-r-r (644):find . -type f -exec chmod 644 {} \;Recursively remove...
View ArticleC: how to specify comparison operators floating precision
There is no way I’m aware of to do what the title says. However…I’m sure that you are aware of the fact that floats representation in any programming language is limited by the precision of the...
View ArticleIOMMU: This costs you 64 MB of RAM
If you have happened to observe similar messages in your dmesg:[ 0.004000] Checking aperture… [ 0.004000] No AGP bridge found [ 0.004000] Node 0: aperture @ 20000000 size 32 MB [ 0.004000] Aperture...
View ArticleR under Debian testing/i386: permanently set pdfviewer option
If you get this message when opening vignettes:Error in openPDF(vif) : getOption(‘pdfviewer’) is ”; please use ‘options(pdfviewer=…)’and you are tired of running this command every time:>...
View ArticleSearch and replace in a MySQL table
This query performs a table-wide search-and-repalce:UPDATE `table_name` SET `table_field` = REPLACE(`table_field`,’string to search for and replace’,'replacement string’);If you need a database-wide...
View Articlentfstruncate binary for Debian (resetting NTFS bad clusters counter)
There is an excellent step-by-step instruction on resetting the bad clusters counter of an NTFS partition with linux-ntfs tools. I’ve checked – it works as expected:Back up important data from...
View ArticleLinux: how to label swap partition w/o losing swap UUID
In short: sudo mkswap -L new_swap_label -U old_swap_UUID /dev/sd_swap_device. If you don’t care about the UUID: just sudo mkswap -L new_swap_label /dev/sd_swap_device.Step-by-step: Identify current...
View ArticleBatch-retrieve EntrezGene homologs using NCBI’s HomoloGene and R’s...
Install the annotationTools R package: source(“http://bioconductor.org/biocLite.R”) biocLite(“annotationTools”)Download full HomoloGene data file from...
View ArticleHow to replace newlines with commas, tabs etc (merge lines)
Imagine you need to get a few lines from a group of files with missing identifier mappings. I have a bunch of files with content similar to this one: ENSRNOG00000018677 1368832_at 25233...
View ArticleHow to relay outgoing postfix emails via another mail server (e.g. your ISP)
Here’s a simple and clear guide for gmail, which also definitely works with other relay hosts. I’ve used it to configure my ISP’s mail relay (they block outgoing port 25) on a Debian Squeeze laptop.
View ArticleHow to easily install any PyPi/easy_install python module on Debian
Imagine you need to install pycassa (which uses easy_install). Here are the 2 (at maximum) very simple steps to have it properly debianized and installed on your Debian/Ubuntu:if you don’t have the...
View ArticleHow to fix: Nokia Ovi Suite could not connect to the Nokia account server
I’ve been getting this message for a long while, when trying to log into Ovi from within my Ovi Suite:Nokia Ovi Suite could not connect to the Nokia account server. Make sure the internet connection is...
View ArticleHow to truncate git history (sample script included)
Under a few assumptions (most importantly – you do not have any non-merged branches,), it is very easy to throw away git repository commits older than an arbitrarily-chosen commit.Here’s a sample...
View ArticleHow to remotely convert live 1xHDD/LVM Linux server to 2xHDD RAID1/LVM...
Assumptions:current HDD is /dev/sda, it has a GPT (with bios_grub being /dev/sda1), separate /boot partition (/dev/sda2), and a physical LVM volume (/dev/sda3), where LVM holds all the remaining...
View Article