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 org.junit.runner.RunWith | |
import org.specs2.mutable.Specification | |
import org.specs2.runner.JUnitRunner | |
@RunWith(classOf[JUnitRunner]) | |
class PlusSpec extends Specification { | |
"plus operator" should { | |
"return sum of two numbers" in { | |
5 must equalTo(2 + 3) | |
} |
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 org.junit.extensions.cpsuite.ClasspathSuite; | |
import org.junit.extensions.cpsuite.ClasspathSuite.ClassnameFilters; | |
import org.junit.runner.RunWith; | |
@RunWith(ClasspathSuite.class) | |
@ClassnameFilters({".*IntegrationTest"}) | |
public class IntegrationTests { | |
} |
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
exports.addition = function(test){ | |
test.same(2 + 3, 5); | |
test.done(); | |
}; |
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
var isArray = function(o){ | |
return Object.prototype.toString.call(o) === '[object Array]'; | |
}; | |
console.log(isArray(['Soo', 'Philip', 'Kim'])); // true | |
console.log(isArray({first: 'Soo', middle: 'Philip', last: 'Kim'})); // false |
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
{exec} = require 'child_process' | |
task 'test', -> | |
cmd = 'ls' | |
options = '-lrt' | |
exec "#{cmd} #{options}", (err, stdout, stderr) -> | |
console.log err if err | |
console.log stdout |
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
require 'couchbase' | |
c = Couchbase.connect(:hostname => 'hostname', | |
:port => 8091, | |
:pool => 'default', | |
:bucket => 'bucket', | |
:username => 'bucket', | |
:password => 'password') | |
c.run do |conn| |
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 ruby -w | |
unless ARGV[0] | |
puts 'Please input USERNAME@HOSTNAME for the argument.' | |
exit | |
end | |
pwd = `echo ~`.strip | |
key_file = "#{pwd}/.ssh/id_rsa.pub" | |
unless File.exists?(key_file) |
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
[user] | |
name = Soo P.J. Kim | |
email = [email protected] | |
[color] | |
branch = auto | |
diff = auto | |
interactive = auto | |
status = auto | |
[core] | |
editor = /usr/bin/vim |
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
alias ll='ls -alG' | |
source /Users/pj/.rvm/scripts/rvm | |
source ~/.git-prompt.sh | |
GIT_PS1_SHOWDIRTYSTATE="true" | |
GIT_PS1_SHOWUNTRACKEDFILES="true" | |
GIT_PS1_SHOWUPSTREAM="verbose" | |
PS1='$(__git_ps1 " (%s) ")\[\033[35m\]\t\[\033[m\]-\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\n\$ ' | |
export TERM=xterm-256color | |
export SVN_EDITOR=/usr/bin/vim |
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
PROMPT='$FG[254][$FG[026]%t$FG[254]]$FG[035]%n@%~$(git_prompt_info)$FG[208]$(rvm_prompt_info)$reset_color | |
$ ' | |
# git theming | |
ZSH_THEME_GIT_PROMPT_PREFIX="$FG[255](" | |
ZSH_THEME_GIT_PROMPT_SUFFIX=")" | |
ZSH_THEME_GIT_PROMPT_CLEAN="✔" | |
ZSH_THEME_GIT_PROMPT_DIRTY="✗" |
OlderNewer