Skip to content

Instantly share code, notes, and snippets.

awk '{if ($12>=maxscore[$1]) { print; maxscore[$1] = $12 } }' out.m8
@voutcn
voutcn / gfa2bed.awk
Last active April 17, 2016 06:59
gfa2bed.awk
#!/bin/awk -f
BEGIN { OFS = "\t" }
$1 == "a" { print gensub("[:|-]", "\t", "g", $4), $2, $5, $3, $6 }
@voutcn
voutcn / install-gcc48-linuxbrew-centos6.md
Created March 8, 2016 06:12 — forked from stephenturner/install-gcc48-linuxbrew-centos6.md
Installing gcc 4.8 and Linuxbrew on CentOS 6

Installing gcc 4.8 and Linuxbrew on CentOS 6

The GCC distributed with CentOS 6 is 4.4.7, which is pretty outdated. I'd like to use gcc 4.8+. Also, when trying to install Linuxbrew you run into a dependency loop where Homebrew's gcc depends on zlib, which depends on gcc. Here's how I solved the problem.

Note: Requires sudo privileges.

Resources:

This post explains how to install NVIDIA proprietary drivers on CentOS 6. By default, CentOS 6 comes with nouveau drivers, which for 3D (OpenGL) rendering, is order of magnitude slower that NVIDIA's proprietary drivers. For instance, I had glxgear running at round 400 frames per second (FPS) before installing NVIDIA proprietary drivers and at around 1000 FPS after. So it pays to add this extra step to your CentOS 6 installation. Before we start, make sure you have all required packages installed:

yum groupinstall "Development Tools"
yum install kernel-devel kernel-headers dkms

The last package (dkms) is needed so that we don't have to reinstall NVIDIA drivers after each kernel updates. Now we are ready to download NVIDIA proprietary drivers - http://www.nvidia.com/Download/index.aspx To find out your Video Card model number, click Main Menu → System Settings → Display or run:

lspci | grep VGA