Skip to content

Instantly share code, notes, and snippets.

Vang Le biocyberman

  • Aalborg University
  • Aalborg, Denmark
Block or report user

Report or block biocyberman

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View emacs-25.1-24bit.diff
diff --git lisp/term/xterm.el lisp/term/xterm.el
index 19eb37a..6298d88 100644
--- lisp/term/xterm.el
+++ lisp/term/xterm.el
@@ -917,6 +917,15 @@ versions of xterm."
;; are more colors to support, compute them now.
(when (> ncolors 0)
(cond
+ ((= (display-color-cells (selected-frame)) 16777216) ; 24-bit xterm
+ (let ((idx (length xterm-standard-colors)))
@webgefrickel
webgefrickel / vim.sh
Created Apr 26, 2016
Compiling vim on Ubuntu 16 with LUA-support
View vim.sh
# Remove previous installations
sudo apt-get remove vim vim-runtime vim-tiny vim-common
# Install dependencies
sudo apt-get install libncurses5-dev python-dev libperl-dev ruby-dev liblua5.2-dev
# Fix liblua paths
sudo ln -s /usr/include/lua5.2 /usr/include/lua
sudo ln -s /usr/lib/x86_64-linux-gnu/liblua5.2.so /usr/local/lib/liblua.so
View btrfs-undelete
#!/bin/bash
# btrfs-undelete
# Copyright (C) 2013 Jörg Walter <info@syntax-k.de>
# This program is free software; you can redistribute it and/or modify it under
# the term of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or any later version.
if [ ! -b "$1" -o -z "$2" -o -z "$3" ]; then
echo "Usage: $0 <dev> <file/dir> <dest>" 1>&2
echo
View Makefile
####################
# Makefile
# Copyright Brian A. Fannin 2015
####################
RDIR = .
DATA_DIR = $(RDIR)/data
GATHER_DIR = $(DATA_DIR)/gather
GATHER_SOURCE = $(wildcard $(GATHER_DIR)/*.Rmd)
@steakknife
steakknife / array_slicing_and_compaction.advanced.bash
Last active Apr 29, 2019
Advanced Bash :: Array slicing and compaction in bash
View array_slicing_and_compaction.advanced.bash
# Advanced Bash :: Array slicing and compaction in bash
# TL;DR
X=(something 'whatever' "i have more S P A C E S than i can give away. arent you jealous?")
# ${X[@]} the usual whole array
# ${X[@]:index:length} slice from index to index+length-1 inclusive
# ${X[@]::length} slice from 0 to length-1 inclusive
# ${X[@]:index} slice from index to end of array inclusive
@mtw
mtw / bam2fastq_cutadapt.sh
Last active Feb 7, 2017
Raw NGS data is often shipped as unaligned BAM files. This shell script converts raw reads to FASTQ format and trims Illumina adapters with cutadapt. Quality Control is performed with FastQC.
View bam2fastq_cutadapt.sh
#!/bin/bash
cutadapt=`which cutadapt`
fastqc=`which fastqc`
bam2fastq=`which bam2fastq`
gzip=`which gzip`
origdir="."
results="cutadapt"
fastqcdir="${results}/FastQC"
adapter5="CTACACTCTTTCCCTACACGACGCTCTTCCGATCT"
View onchange.sh
#!/bin/bash
#
# Watch current directory (recursively) for file changes, and execute
# a command when a file or directory is created, modified or deleted.
#
# Written by: Senko Rasic <senko.rasic@dobarkod.hr>
#
# Requires Linux, bash and inotifywait (from inotify-tools package).
#
# To avoid executing the command multiple times when a sequence of
@ScottPhillips
ScottPhillips / .htaccess
Created Feb 2, 2012
Common .htaccess Redirects
View .htaccess
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@melpomene
melpomene / wordcollector.py
Created Oct 11, 2011
Wordlist generating script that parses websites for words.
View wordcollector.py
#!/usr/bin/env python2.7
''' Creates wordlists from web scraping. BeautifulSoup requierd (pip install beautifulsoup) '''
import sys
import os
import robotparser
from BeautifulSoup import BeautifulSoup as bs
import urllib2
from urlparse import urlparse
@lindenb
lindenb / bam2wig.c
Created Feb 15, 2011
Transforms a BAM file to WIG
View bam2wig.c
/*
Author:
Pierre Lindenbaum PhD
WWW:
http://plindenbaum.blogspot.com
contact:
plindenbaum@yahoo.fr
Motivation:
creates a WIG file from a BAM file
You can’t perform that action at this time.