Skip to content

Instantly share code, notes, and snippets.

konrad /
Last active Aug 23, 2017
Returns a BibTeX entry for one or more given DOIs.
#!/usr/bin/env bash
# Returns a BibTeX ( entry for one or more given DOIs
# (
# Call it like this:
# $ 10.1093/bioinformatics/btu533
# Can also be used for several DOIs at once:
stefansundin /
Last active Mar 24, 2020
Install OpenSSH 7.3 in Ubuntu 16.04
# WARNING: Use this at your own risk. It will probably break your other packages and cause other havoc.
# These days you should just upgrade to Ubuntu 18.04.
$ ssh -V
OpenSSH_7.2p2 Ubuntu-4ubuntu2.1, OpenSSL 1.0.2g 1 Mar 2016
rvl / git-pushing-multiple.rst
Created Feb 9, 2016
How to push to multiple git remotes at once. Useful if you keep mirrors of your repo.
View git-pushing-multiple.rst

Pushing to Multiple Git Repos

If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.

Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.

If in doubt about what git is doing when you run these commands, just

noamross / google_wordcloud.R
Created Apr 22, 2015
Create a wordcloud of your google search history
View google_wordcloud.R
# Script to make a word cloud of your google searches. Get your google search
# history at This script assumes the JSON files
# exported are in a 'Searches' subfolder
yihui / warnings.R
Created Sep 22, 2013
this shows the correct way to suppress warnings is suppressWarnings() instead of options(warn = -1) alone; similarly, you should use suppressMessages() to suppress messages
View warnings.R
options(warn = -1)
# cannot really suppress warnings from the root level
withCallingHandlers(warning("hi"), warning = function(w) {
# the warning can still be captured:
## <simpleWarning in withCallingHandlers(warning("hi"), warning = function(w) { print(w)}): hi>
# however, this always works
You can’t perform that action at this time.