Skip to content

Instantly share code, notes, and snippets.

@bitc
bitc / Mac_OSX_Keyboard.md
Last active September 6, 2018 09:44
How I Configure Mac OS X Keyboard

How I configure Mac OS X Keyboard

Start Synergy Client on login

"System Preferences" -> "Users & Groups" -> "Login Options" -> Enable "Automatic Login"

Create the following script as ~/start_synergy.sh:

#!/bin/sh

@bitc
bitc / cabal-fast-configure
Created December 29, 2012 08:19
A wrapper around the "cabal configure" command. It saves a hash of the configure arguments, and skips the actual configure if the arguments have not changed, thus shaving a few seconds off of your build time. Has support for hsenv. If you change your package database make sure to run "cabal-fast-configure --clean"
#!/bin/sh
set -e
if [ ! -f *.cabal ]
then
echo "You must run this script from the project root directory (where the .cabal file is)"
exit 2
fi
@bitc
bitc / termview
Last active December 9, 2015 16:48
Opens a terminal window for viewing the output of a command. Useful with Vim for viewing the progress of a compilation or other external command, when run in silent mode.
#!/bin/bash
set -e
OUTPUT_PIPE=`mktemp -u`
STDOUT_SYNC=`mktemp -u`
STDERR_SYNC=`mktemp -u`
mkfifo $OUTPUT_PIPE $STDOUT_SYNC $STDERR_SYNC
exec > >(tee -a $OUTPUT_PIPE ; echo > $STDOUT_SYNC)
@bitc
bitc / init_darcs_in_git.sh
Created December 1, 2012 22:17
Use darcs to version control private files in a git repository
#!/bin/sh
# init_darcs_in_git.sh
#
# This is a script that initializes a darcs repository that can be used for
# managing private files in a git repository that should not be tracked by git
#
# The system is a simple hack, but it works quite elegantly in practice, darcs
# and git do not get in each others way.
#