Skip to content

Instantly share code, notes, and snippets.

#! /bin/sh
GITDIR=$(git rev-parse --git-dir)
TAGSFILE=tags.$$
mkdir $GITDIR/tags_lock 2>/dev/null || exit 0
trap "rmdir $GITDIR/tags_lock; rm $GITDIR/$TAGSFILE" EXIT
# normal ctags
ctags --tag-relative -Rf $GITDIR/$TAGSFILE --exclude=$GITDIR
#!/bin/sh
#
# cmus-status-display
#
# Usage:
# in cmus command ":set status_display_program=cmus-status-display"
#
# This scripts is executed by cmus when status changes:
# cmus-status-display key1 val1 key2 val2 ...
#
#! /bin/sh
usage() {
echo "usage: $0 <title>"
}
if [ $# -eq 0 ] ; then
usage
exit 1
fi
@atn34
atn34 / run_tests.sh
Last active May 19, 2019 18:35
run_tests.sh
#! /bin/bash
#RUNTIME is the path to the directory with the makefile/cubex_lib.h etc
#JARFILE is the path to your compiler
RUNTIME=../../../runtime
JARFILE=../../../x3c.jar
FLAGS=
FILES=
@atn34
atn34 / vim-demo-agenda.txt
Last active December 28, 2015 04:39
Vim demo agenda
Starting out
============
$ vim -u NONE
:syntax on # minimal configuration so we're all on the same page
$ vimtutor
:h
Basics
======
the dot command (:h .)
@atn34
atn34 / gist:6362269
Created August 28, 2013 04:57
error trying to install merlin with opam
The following actions will be performed:
- install merlin.1.3.1
1 to install | 0 to reinstall | 0 to upgrade | 0 to downgrade | 0 to remove
=-=-= Installing merlin.1.3.1 =-=-=
The archive for merlin.1.3.1 is in the local cache.
Extracting /home/andrew/.opam/archives/merlin.1.3.1+opam.tar.gz.
Building merlin.1.3.1:
./configure --prefix /home/andrew/.opam/4.00.1
make
@atn34
atn34 / low_battery.sh
Created April 7, 2013 22:39
Notifies you if your battery is below a certain threshold and isn't charging. I'm using it for xmonad
#! /bin/sh
#
# Script for notifying when battery is low
# Set it up as a cronjob with
#
# $ crontab -e
#
# put the following in your crontab file to check every minute
#
# * * * * * env DISPLAY=:0.0 <absolute path to script>