View PlayParameterReader.scala
package PlayParameterReader
/**
* @author Jay Taylor <outtatime@gmail.com>
*
* @date 2011-05-23
*/
import scala.collection.JavaConversions._
View .tmux.conf
# 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"
View .vimrc
" 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
View output.txt
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
View StringExtras.scala
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")
View mysql-fast-loader.sh
#!/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
View etc.init.openvpn.conf
# openvpn
#
description "OpenVPN - virtual private network daemon(s)"
author "Jay"
version "1.0.0"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
View CryptUtil.scala
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
View log4j-force-utc-timestamp.properties
# 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
View curl_request_async.inc.php
<?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
*/