Skip to content

Instantly share code, notes, and snippets.

View davfre's full-sized avatar

David Fredman davfre

View GitHub Profile
davfre / extend.json
Created April 1, 2022 05:51 — forked from 39aldo39/extend.json
Karabiner-Elements extend
"title": "Extend",
"rules": [
"description": "Extend",
"manipulators": [
"type": "basic",
"from": {
"key_code": "1",
davfre /
Last active August 29, 2015 14:04
Convert JGI gtf-like annotation file to GTF2.2 format
#!/usr/bin/perl -w
use strict;
use warnings;
This script converts a JGI gtf-like file:
scaffold_1 JGI exon 46078 46218 . + . name "gw.1.597.1"; transcriptId 65742
davfre /
Last active August 29, 2015 14:04
Filter a textfile to output only the lines where a given identifier is present.
use strict;
my $usage = "cat input.gtf | $! idlist.txt > filtered.gtf\n";
my %ids;
my $FN_idlist = $ARGV[0];
open my $FH_idlist, "<", $FN_idlist or die $usage;
# read id list to memory
davfre /
Last active February 24, 2024 01:23
SAM and BAM filtering oneliners
davfre /
Last active May 12, 2024 04:37
git commandline cheat-sheet
davfre / IBM Tivoli 6.4.0 Installation on Ubuntu
Last active August 29, 2022 18:42
Installation procedure for the IBM Tivoli 6.4.0 client for Ubuntu 12.10.

The procedure below documents how to install the IBM Tivoli client on the Ubuntu linux distribution. The steps involve unpacking the distributed RPMs, removing and renaming a few files in the resulting folders, and editing and adding a few configuration text files, followed by packaging .deb files for installation.

Adapted from

Current versions: IBM Tivoli 6.4.0 Ubuntu 12.10

davfre / .tmux.conf
Created December 5, 2012 10:06
tmux config
#go to last active window (hit C-b twice)
bind-key C-b last-window
#split windows key bindings
unbind %
bind | split-window -h
bind - split-window -v
#status bar
set -g status-bg black
set -g status-fg white
set -g status-left '#[fg=green]#H'
davfre / Pattern.t
Created November 14, 2012 07:25
Test script for AppliedProgramming course, Exercise 6
use Test::More tests => 15;
use Pattern;
use Restriction;
use strict;
use warnings;
# sequences for testing
my $testsequence0 = "AAAAAAAAAACGATCTAAAAAAA" ; #should not match
my $testsequence1 = "AAAAAAAAAAAGATCCAAAAAAA" ; #should match
my $testsequence2 = "AAAAAAAAAAGGATCTAAAAAAA" ; #should match
davfre /
Created October 31, 2012 12:50
# Multiple pipes to/from one process
davfre / .screenrc
Created October 22, 2012 07:06
escape ^Tt
caption string "%?%F%{= Bk}%? %C%A %D %d-%m-%Y %{= kB} %t%= %?%F%{= Bk}%:%{= wk}%? %n "
shell bash
defscrollback 10000
hardstatus on
hardstatus alwayslastline
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %d/%m %{W}%c %{g}]'
vbell off