This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package PlayParameterReader | |
/** | |
* @author Jay Taylor <outtatime@gmail.com> | |
* | |
* @date 2011-05-23 | |
*/ | |
import scala.collection.JavaConversions._ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make it use C-a, similar to screen.. | |
unbind C-b | |
unbind l | |
set -g prefix C-a | |
bind-key C-a last-window | |
# Reload key | |
bind r source-file ~/.tmux.conf | |
set -g default-terminal "screen-256color" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Paste this into your .vimrc to make tab/shift-tab work on blocks of text just like in a fancy GUI IDE | |
map <Tab> >gb | |
map <S-Tab> v<gv<ESC>0I<ESC>l | |
imap <S-Tab> <ESC>v<gv<ESC>0I | |
vnoremap <Tab> >gv | |
vnoremap <S-Tab> <gv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Buildfile: /Users/jtaylor/klout/perks/swagger-core/build.xml | |
clean: | |
[echo] deleting build files | |
[echo] deleting libs handled by ivy | |
resolve: | |
[ivy:retrieve] :: Ivy 2.1.0-rc2 - 20090704004254 :: http://ant.apache.org/ivy/ :: | |
[ivy:retrieve] :: loading settings :: file = /Users/jtaylor/klout/perks/swagger-core/ivysettings.xml | |
[ivy:retrieve] :: resolving dependencies :: wordnik#swagger-core;working@secretcode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class StringExtras(string: String) { def % (args: Any*) = String.format(string, args.toArray.asInstanceOf[Array[Object]]: _*) } | |
implicit def stringExtras(string: String) = new StringExtras(string) | |
"%s, %s" % ("hello", "world") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
## | |
# @author Jay Taylor <outtatime@gmail.com> | |
# | |
# @date 2011-10-20 | |
# | |
# @description Copies MySQL database to ramdisk then runs supplied shell script | |
# or command. The ramdisk version of the database is then copied back to the | |
# filesystem. Speeds up IO-intensive operations (e.g. loading heavily indexed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# openvpn | |
# | |
description "OpenVPN - virtual private network daemon(s)" | |
author "Jay" | |
version "1.0.0" | |
start on runlevel [2345] | |
stop on runlevel [!2345] | |
respawn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.crypto.{Cipher, SecretKeyFactory, SecretKey} | |
import javax.crypto.spec.{PBEKeySpec, SecretKeySpec} | |
import java.lang.{Long => JLong} | |
import java.security.MessageDigest | |
import java.security.spec.KeySpec | |
import java.util.Arrays | |
/** | |
* @author Jay Taylor <jay@klout.com> | |
* @date 2011-11-09 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A1 uses PatternLayout. | |
log4j.appender.A1.layout=org.apache.log4j.EnhancedPatternLayout | |
log4j.appender.A1.layout.ConversionPattern=[%d{ISO8601}{GMT}] %-4r [%t] %-5p %c %x - %m%n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @author Jay Taylor [@jtaylor] | |
* | |
* @date 2012-02-23 | |
* | |
* @description Originally found on SO: | |
* http://stackoverflow.com/questions/962915/how-do-i-make-an-asynchronous-get-request-in-php | |
*/ |
OlderNewer