Skip to content

Instantly share code, notes, and snippets.

Praveen pvik

Block or report user

Report or block pvik

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
pvik /
Last active May 18, 2020
A Cheatsheet for Emacs Smarparens example configuration

An animated cheatsheet for smartparens using the example configuration specified here by the smartparens author. Inspired by this tutorial for paredit.


C-M-f sp-forward-sexp
C-M-b sp-backward-sexp
pvik /
Last active Sep 14, 2018
Hibernate on Low Battery, when acpi does not report proper battery status
# Battery threshold below which, script will hibernate if discharging
# temporary file to store the previous battery charge value, to determine if battery is being discharged
# read in batt charge from acpi
echo "`acpi -b`, `cat /tmp/batt_charge`%" | awk -F'[:,%]' '{print $2, $3, $5, ($5 - $3), ($3-$5)<0?"discharging":"powered"}' | {
read -r acpi_status capacity old_capacity capacity_diff status
View gist:56c3c3a3ea655bee8aae
gnuplot> set datafile separator ","
gnuplot> plot 'calls.csv' using 2:xticlabels(1) with lines
View adding ms sqlserver jar to maven
taken from [here]{}
mvn install:install-file -Dfile=sqljdbc4.jar -Dpackaging=jar -DartifactId=sqljdbc4 -Dversion=4.0
You can’t perform that action at this time.