Skip to content

Instantly share code, notes, and snippets.


Michael van Eggermond mvaneggermond

View GitHub Profile
View gist:08de8db270eb94b6b762ec2052da7926
# convert PuTTY's public ssh key file into OpenSSH public key
ssh-keygen -i -f >
mvaneggermond /
Last active Sep 4, 2020
Switching Java versions on OS X

You can view the installed versions on your computer by entering the following command in terminal:

/usr/libexec/java_home -V

For instance, I have the following versions installed:

14.0.2, x86_64:	"Java SE 14.0.2"	/Library/Java/JavaVirtualMachines/jdk-14.0.2.jdk/Contents/Home
mvaneggermond / round_df.R
Last active Sep 20, 2016
Round numeric values in a dataframe (R).
View round_df.R
round_df <- function(df,digits)
nums <- vapply(df,is.numeric, FUN.VALUE = logical(1))
df[,nums] <- round(df[,nums],digits=digits)