Skip to content

Instantly share code, notes, and snippets.

View konrad's full-sized avatar

Konrad Förstner konrad

View GitHub Profile
@konrad
konrad / speedupmp3.sh
Created May 29, 2010 17:00
Shell script to increases the speed of given mp3 files.
#!/bin/sh
#
# Increases the speed of given mp3 files.
#
# Published by Konrad Förstner CC0 (Creative Commons Zero)
# No Rights Reserved
# http://creativecommons.org/publicdomain/zero/1.0/
#
# To the extent possible under law, Konrad Förstner has waived all
# copyright and related or neighboring rights to this work. This
@konrad
konrad / csv2xlsx.py
Last active April 1, 2022 16:46
Converts a CSV (tab delimited) file to an Excel xlsx file
#!/usr/bin/env python
"""
FUNCTION: Converts a CSV (tab delimited) file to an Excel xlsx file.
Copyright (c) 2016, Konrad Foerstner <konrad@foerstner.org>
Permission to use, copy, modify, and/or distribute this software for
any purpose with or without fee is hereby granted, provided that the
above copyright notice and this permission notice appear in all
copies.
#!/usr/bin/env bash
#
# Script to run within the NixOS install image.
#
set -o errexit
readonly SWAP_SIZE_IN_GB=1
@konrad
konrad / mass_rename_master_to_main_branch.sh
Last active June 15, 2020 20:48
Script to mass rename the master branch to main branch in git repos.
#!/bin/env bash
#
# Copyright 2020 Konrad Förstner
#
# Permission to use, copy, modify, and/or distribute this software for
# any purpose with or without fee is hereby granted, provided that the
# above copyright notice and this permission notice appear in all
# copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
@konrad
konrad / image_to_video_with_ffmpeg.sh
Created April 12, 2020 11:01
Small shell script to combine some photos and a mp3 file into a video file using ffmpeg
#!/bin/bash
# Small script to combine some photos, cut a mp3 file into two pieces,
# fade in and out and merge everything. Rather specific so needs to be
@konrad
konrad / doi2bibtex.sh
Last active August 23, 2017 08:52
Returns a BibTeX entry for one or more given DOIs.
#!/usr/bin/env bash
# Returns a BibTeX (www.bibtex.org) entry for one or more given DOIs
# (https://www.doi.org/).
#
# Call it like this:
#
# $ doi2bibtex.sh 10.1093/bioinformatics/btu533
#
# Can also be used for several DOIs at once:

Keybase proof

I hereby claim:

  • I am konrad on github.
  • I am konradfoerstner (https://keybase.io/konradfoerstner) on keybase.
  • I have a public key whose fingerprint is 5801 2301 E981 C65D E0DB C0A1 41E6 AF4E DF9D B3D3

To claim this, I am signing this object:

@konrad
konrad / split_fasta.py
Last active October 19, 2016 07:50
Split a multi entry fasta file into several files with on entry
import argparse
from Bio import SeqIO
parser = argparse.ArgumentParser(
description="Split a multi entry fasta file into several files "
"with one entry")
parser.add_argument("input_file")
parser.add_argument("output_prefix")
args = parser.parse_args()
@konrad
konrad / Dockerfile
Last active August 3, 2016 18:24
Dockerfile for testing "The Lair"
FROM ubuntu:16.04
RUN apt-get update && apt-get dist-upgrade -y
RUN apt-get install -y curl wget git ruby python3 sra-toolkit snakemake libssl-dev libcurl4-openssl-dev libxml2-dev
WORKDIR /root
RUN wget https://github.com/pachterlab/kallisto/releases/download/v0.43.0/kallisto_linux-v0.43.0.tar.gz && \
tar xzf kallisto_linux-v0.43.0.tar.gz && \
mv kallisto_linux-v0.43.0/kallisto /usr/bin/ && \
rm -rf kallisto_linux-v0.43.0 kallisto_linux-v0.43.0.tar.gz
@konrad
konrad / zika_PMID_search.txt
Created May 26, 2016 15:09
Pubmed IDs of publications that are the results of the search "zika virus[Mesh terms] OR zika fever[Mesh terms]"
27203499
27203498
27187993
27147017
27115821
27111981
27111968
27082204
27078543
27048000