Skip to content

Instantly share code, notes, and snippets.

View konrad's full-sized avatar

Konrad Förstner konrad

View GitHub Profile
@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:
@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 / 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
#!/usr/bin/env bash
#
# Script to run within the NixOS install image.
#
set -o errexit
readonly SWAP_SIZE_IN_GB=1