Browse files

stuff

  • Loading branch information...
1 parent b4e34db commit e015fd994647c131e5af2143a538566ff28c47e4 @sjl committed Jul 12, 2012
View
28 bin/lein2
@@ -1,7 +1,6 @@
-#!/bin/bash
+#!/usr/bin/env bash
-LEIN_VERSION="2.0.0-preview4"
-export LEIN_VERSION
+export LEIN_VERSION="2.0.0-preview7"
case $LEIN_VERSION in
*SNAPSHOT) SNAPSHOT="YES" ;;
@@ -90,6 +89,7 @@ if [ -r "$BIN_DIR/../src/leiningen/version.clj" ]; then
mkdir -p "$LEIN_DIR/target/classes"
export LEIN_JVM_OPTS=${LEIN_JVM_OPTS:-"-Dclojure.compile.path=$LEIN_DIR/target/classes"}
CLASSPATH="$LEIN_DIR/leiningen-core/src/"
+ CLASSPATH="$CLASSPATH:$LEIN_DIR/leiningen-core/resources/"
CLASSPATH="$CLASSPATH:$(cat $LEIN_DIR/.lein-classpath 2> /dev/null)"
CLASSPATH="$CLASSPATH:$LEIN_DIR/leiningen-core/lib/*"
CLASSPATH="$CLASSPATH:$LEIN_DIR/test:$LEIN_DIR/target/classes"
@@ -112,12 +112,15 @@ else # Not running from a checkout
fi
fi
-HTTP_CLIENT=${HTTP_CLIENT:-"wget -O"}
-if type -p curl >/dev/null 2>&1; then
- if [ "$https_proxy" != "" ]; then
- CURL_PROXY="-x $https_proxy"
+if [ "$HTTP_CLIENT" = "" ]; then
+ if type -p curl >/dev/null 2>&1; then
+ if [ "$https_proxy" != "" ]; then
+ CURL_PROXY="-x $https_proxy"
+ fi
+ HTTP_CLIENT="curl $CURL_PROXY -f -L -o"
+ else
+ HTTP_CLIENT="wget -O"
fi
- HTTP_CLIENT="curl $CURL_PROXY -f -L -o"
fi
export JAVA_CMD=${JAVA_CMD:-"java"}
@@ -142,6 +145,10 @@ if [ "$1" = "self-install" ]; then
$HTTP_CLIENT "$LEIN_JAR" "$LEIN_URL"
if [ $? != 0 ]; then
echo "Failed to download $LEIN_URL"
+ echo "If you have an old version of libssl you may not have the correct"
+ echo "certificate authority. Either upgrade or set HTTP_CLIENT to insecure:"
+ echo " export HTTP_CLIENT=\"wget --no-check-certificate -O\" # or"
+ echo " export HTTP_CLIENT=\"curl --insecure -f -L -o"
if [ $SNAPSHOT = "YES" ]; then
echo "If you have Maven installed, you can do"
echo "mvn dependency:copy-dependencies; mv target/dependency lib"
@@ -173,6 +180,9 @@ elif [ "$1" = "upgrade" ]; then
echo
echo "Upgrading..."
TARGET="/tmp/lein-$$-upgrade"
+ if [ "$OSTYPE" = "cygwin" ]; then
+ TARGET=`cygpath -w $TARGET`
+ fi
LEIN_SCRIPT_URL="https://github.com/technomancy/leiningen/raw/$TARGET_VERSION/bin/lein"
$HTTP_CLIENT "$TARGET" "$LEIN_SCRIPT_URL" \
&& mv "$TARGET" "$SCRIPT" \
@@ -203,6 +213,8 @@ else
$LEIN_JAVA_CMD \
-client -XX:+TieredCompilation \
$LEIN_JVM_OPTS \
+ -Dfile.encoding=UTF-8 \
+ -Dmaven.wagon.http.ssl.easy=false \
-Dleiningen.original.pwd="$ORIGINAL_PWD" \
-Dleiningen.trampoline-file=$TRAMPOLINE_FILE \
-cp "$CLASSPATH" \
View
2 dotjs/github.com.js
@@ -1,5 +1,5 @@
$(function() {
- if ($('body').hasClass('page-commits')) {
+ if ($('li.commit').length) {
$('ul.pagehead-actions').prepend('<li><a class="minibutton btn-watch" href="#reviewing" id="toggle-merges-button"><span><span class="icon"></span><span class="text">Review</span></span></a></li>');
View
133 dotjs/google.com.js
@@ -1,3 +1,136 @@
+/*
+ * jQuery Hotkeys Plugin
+ * Copyright 2010, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ *
+ * Based upon the plugin by Tzury Bar Yochay:
+ * http://github.com/tzuryby/hotkeys
+ *
+ * Original idea by:
+ * Binny V A, http://www.openjs.com/scripts/events/keyboard_shortcuts/
+*/
+(function(jQuery){
+ jQuery.hotkeys = {
+ version: "0.8",
+
+ specialKeys: {
+ 8: "backspace", 9: "tab", 13: "return", 16: "shift", 17: "ctrl", 18: "alt", 19: "pause",
+ 20: "capslock", 27: "esc", 32: "space", 33: "pageup", 34: "pagedown", 35: "end", 36: "home",
+ 37: "left", 38: "up", 39: "right", 40: "down", 45: "insert", 46: "del",
+ 96: "0", 97: "1", 98: "2", 99: "3", 100: "4", 101: "5", 102: "6", 103: "7",
+ 104: "8", 105: "9", 106: "*", 107: "+", 109: "-", 110: ".", 111 : "/",
+ 112: "f1", 113: "f2", 114: "f3", 115: "f4", 116: "f5", 117: "f6", 118: "f7", 119: "f8",
+ 120: "f9", 121: "f10", 122: "f11", 123: "f12", 144: "numlock", 145: "scroll", 191: "/", 224: "meta"
+ },
+
+ shiftNums: {
+ "`": "~", "1": "!", "2": "@", "3": "#", "4": "$", "5": "%", "6": "^", "7": "&",
+ "8": "*", "9": "(", "0": ")", "-": "_", "=": "+", ";": ": ", "'": "\"", ",": "<",
+ ".": ">", "/": "?", "\\": "|"
+ }
+ };
+ function keyHandler( handleObj ) {
+ // Only care when a possible input has been specified
+ if ( typeof handleObj.data !== "string" ) {
+ return;
+ }
+
+ var origHandler = handleObj.handler,
+ keys = handleObj.data.toLowerCase().split(" ");
+
+ handleObj.handler = function( event ) {
+ // Don't fire in text-accepting inputs that we didn't directly bind to
+ if ( this !== event.target && (/textarea|select/i.test( event.target.nodeName ) ||
+ event.target.type === "text") ) {
+ return;
+ }
+
+ // Keypress represents characters, not special keys
+ var special = event.type !== "keypress" && jQuery.hotkeys.specialKeys[ event.which ],
+ character = String.fromCharCode( event.which ).toLowerCase(),
+ key, modif = "", possible = {};
+
+ // check combinations (alt|ctrl|shift+anything)
+ if ( event.altKey && special !== "alt" ) {
+ modif += "alt+";
+ }
+
+ if ( event.ctrlKey && special !== "ctrl" ) {
+ modif += "ctrl+";
+ }
+
+ // TODO: Need to make sure this works consistently across platforms
+ if ( event.metaKey && !event.ctrlKey && special !== "meta" ) {
+ modif += "meta+";
+ }
+
+ if ( event.shiftKey && special !== "shift" ) {
+ modif += "shift+";
+ }
+
+ if ( special ) {
+ possible[ modif + special ] = true;
+
+ } else {
+ possible[ modif + character ] = true;
+ possible[ modif + jQuery.hotkeys.shiftNums[ character ] ] = true;
+
+ // "$" can be triggered as "Shift+4" or "Shift+$" or just "$"
+ if ( modif === "shift+" ) {
+ possible[ jQuery.hotkeys.shiftNums[ character ] ] = true;
+ }
+ }
+
+ for ( var i = 0, l = keys.length; i < l; i++ ) {
+ if ( possible[ keys[i] ] ) {
+ return origHandler.apply( this, arguments );
+ }
+ }
+ };
+ }
+ jQuery.each([ "keydown", "keyup", "keypress" ], function() {
+ jQuery.event.special[ this ] = { add: keyHandler };
+ });
+})($);
+
+$(function() {
+ $results = $('#res h3.r a.l');
+
+ if ($results.length) {
+ for (var i=0; i < 9; i++) {
+ var $r = $results.eq(i);
+
+ $r.prepend('<span class="keyshortcut">' + (i + 1) + '</span>');
+ $('span.keyshortcut', $r)
+ .css('color', '#ffffff')
+ .css('background', '#1122CC')
+ .css('font-weight', 'bold')
+ .css('font-size', '12px')
+ .css('padding', '1px 3px')
+ .css('border-radius', '2px')
+ .css('margin-right', '5px')
+ .css('z-index', '9999')
+ }
+
+ $d = $(document);
+
+ $d.bind('keydown', '1', function(e) { go(e); });
+ $d.bind('keydown', '2', function(e) { go(e); });
+ $d.bind('keydown', '3', function(e) { go(e); });
+ $d.bind('keydown', '4', function(e) { go(e); });
+ $d.bind('keydown', '5', function(e) { go(e); });
+ $d.bind('keydown', '6', function(e) { go(e); });
+ $d.bind('keydown', '7', function(e) { go(e); });
+ $d.bind('keydown', '8', function(e) { go(e); });
+ $d.bind('keydown', '9', function(e) { go(e); });
+
+ var go = function(e) {
+ var num = parseInt(e.data, 0) - 1;
+ document.location = $results.eq(num).attr('href');
+ };
+ }
+});
+
$(function() {
var css = ".vspib, .vspb, .vspi {display: none;} #vspb {display: none;}";
if (typeof GM_addStyle != "undefined") {
View
2 fish/config.fish
@@ -83,6 +83,8 @@ set -g -x COMMAND_MODE unix2003
set -g -x RUBYOPT rubygems
set -g -x CLASSPATH "$CLASSPATH:/usr/local/Cellar/clojure-contrib/1.2.0/clojure-contrib.jar"
+set -g -x NODE_PATH "/usr/local/lib/node_modules"
+
# }}}
# Python variables {{{
View
4 keymando/keymandorc.rb
@@ -22,11 +22,13 @@
activate('iTerm')
send('<Cmd-Option-1>')
send('<Ctrl-f>2')
+ send('2')
end
map "<Ctrl-Shift-I>" do
activate('iTerm')
send('<Cmd-Option-1>')
- send('<Ctrl-f>1')
+ send('<Ctrl-f>')
+ send('1')
end
# Refresh ---------------------------------------------------------------------
View
BIN moom/com.manytricks.Moom.plist
Binary file not shown.
View
3 mutt/muttrc
@@ -12,7 +12,8 @@ set print_command = /usr/bin/enscript # print with enscript
set editor = "vim +/^$ +:s/^$/\\\\r\\\\r/ +:noh -c 'normal! k' -c 'set nolist' -c 'redraw'"
# Use the OS X address book
-set query_command = "lbdbq '%s' | sed -e 's/(null)//g'"
+# set query_command = "lbdbq '%s' | sed -e 's/(null)//g'"
+set query_command = "contacts -Sf '%eTOKEN%n' '%s' | sed -e 's/TOKEN/\t/g'"
bind editor <Tab> complete-query
bind editor ^T complete
View
2 vim/after/plugin/surround-mapping.vim
@@ -0,0 +1,2 @@
+" Use the old surround.vim key. I can't deal with the new one.
+vmap s S
View
19 vim/custom-dictionary.utf-8.add
@@ -32,3 +32,22 @@ Clojurecraft
Mojang
Minecraft
wiki
+blog
+MySQL
+refactor
+Lanterna
+interop
+roguelike
+Minecraft's
+Trystan
+Nethack
+namespace
+gameplay
+Trystan's
+multiplayer
+UI
+crosshair
+viewport
+keypresses
+screenshots
+Screenshot
View
4 vim/vimrc
@@ -49,8 +49,8 @@ set dictionary=/usr/share/dict/words
set spellfile=~/.vim/custom-dictionary.utf-8.add
set colorcolumn=+1
-" Don't try to highlight lines longer than 500 characters.
-set synmaxcol=500
+" Don't try to highlight lines longer than 800 characters.
+set synmaxcol=800
" Time out on key codes but not mappings.
" Basically this makes terminal Vim work sanely.

0 comments on commit e015fd9

Please sign in to comment.