Skip to content

Instantly share code, notes, and snippets.

@tleonardi
tleonardi / gantt.R
Last active August 29, 2015 14:13
Gantt charts with ggplot2
library(reshape2)
library(ggplot2)
tasks <- c("M1.1: Text \n here",
"M1.2: Text \n here",
"M1.3: Text \n here",
"M2.1: Text \n here",
"M2.2: Text \n here",
"M2.3: Text \n here"
)
/*! normalize.css v3.0.1 | MIT License | git.io/normalize */
/**
* 1. Set default font family to sans-serif.
* 2. Prevent iOS text size adjust after orientation change, without disabling
* user zoom.
*/
html {
font-family: sans-serif; /* 1 */
@tleonardi
tleonardi / gist:a0d296916cb390b84d8c
Last active August 29, 2015 14:01
Oneliner to plot the number of LSF jobs for the 30 users with most running jobs
bjobs -r -u all | tail -n +2 | awk '{print $2}' | sort | uniq -c | sed 's/^*//' | sort -k1,1nr | head -30 | /usr/bin/gnuplot -persist -e "set boxwidth 0.1;set style fill solid 0.5 border -1; set logscale y;plot '-' using 1:xtic(2) with boxes"
@tleonardi
tleonardi / bobR.sh
Created May 22, 2014 10:21
Wrapper script to run Vim-R-plugin R sessions as interactive jobs on LSF platforms
#!/bin/bash
# Wrapper script to run Vim-R-plugin R sessions as interactive jobs on LSF platforms.
# To use it, edit ~/.vimrc and add 'let vimrplugin_r_path = <path_to_script>'
# lets you deicde
echo What version of R do you want?
echo "1) R vX.X.X"
echo "2) R vZ.Z.Z"
echo "3) R vY.Y.Y"
read -t 60 -p '>' answer