most of these require logout/restart to take effect
# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
# Set a shorter Delay until key repeat
for i in $HOME/local/*; do | |
[ -d $i/bin ] && PATH="${i}/bin:${PATH}" | |
[ -d $i/sbin ] && PATH="${i}/sbin:${PATH}" | |
[ -d $i/include ] && CPATH="${i}/include:${CPATH}" | |
[ -d $i/lib ] && LD_LIBRARY_PATH="${i}/lib:${LD_LIBRARY_PATH}" | |
[ -d $i/lib ] && LD_RUN_PATH="${i}/lib:${LD_RUN_PATH}" | |
# uncomment the following if you use macintosh | |
# [ -d $i/lib ] && DYLD_LIBRARY_PATH="${i}/lib:${DYLD_LIBRARY_PATH}" | |
[ -d $i/lib/pkgconfig ] && PKG_CONFIG_PATH="${i}/lib/pkgconfig:${PKG_CONFIG_PATH}" | |
[ -d $i/share/man ] && MANPATH="${i}/share/man:${MANPATH}" |
console.log("got here"); | |
var page = require('webpage').create(); | |
page.onConsoleMessage = function(msg) { | |
console.log(msg); | |
}; | |
page.open("http://facebook.com", function(status) { | |
if ( status === "success" ) { |
/* | |
* grunt | |
* https://github.com/cowboy/grunt | |
* | |
* Copyright (c) 2012 "Cowboy" Ben Alman | |
* Copyright (c) 2012 John K. Paul @johnkpaul | |
* Licensed under the MIT license. | |
* http://benalman.com/about/license/ | |
*/ |
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
#!/bin/bash | |
# | |
# Links files in this directory to the current users home directory. | |
# | |
# If the link already exists the file will be skipped unless the -f flag is given. | |
real_path () { | |
_=`pwd` | |
[ -d $DIR ] && DIR=$1 | |
[ -f $DIR ] && DIR=`dirname $1` |
<?php | |
class MyToroHandler extends ToroHandler { | |
public $tpl; | |
public function __construct() { | |
$this->tpl = new Template(TPL_PATH); | |
ToroHook::add('after_handler', function() { $this->tpl->display('layout.tpl.php'); }); | |
} | |
} |
import java.io.File; | |
import java.io.RandomAccessFile; | |
import java.lang.reflect.Method; | |
import java.util.ArrayList; | |
/** | |
* A log file tailer is designed to monitor a log file and send notifications | |
* when new lines are added to the log file. This class has a notification | |
* strategy similar to a SAX parser: implement the LogFileListener interface, | |
* create a LogFileTailer to tail your log file, add yourself as a listener, and |