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 DateHelper = { | |
// Takes the format of "Jan 15, 2007 15:45:00 GMT" and converts it to a relative time | |
// Ruby strftime: %b %d, %Y %H:%M:%S GMT | |
time_ago_in_words_with_parsing: function(from) { | |
var date = new Date; | |
date.setTime(Date.parse(from)); | |
return this.time_ago_in_words(date); | |
}, | |
time_ago_in_words: function(from) { |
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
# ever wanted capistrano talk to you? | |
# this is used with ext/multistage and only works on a mac | |
require 'capistrano_colors' | |
before :deploy, :say_begin_deploy | |
after :deploy, :say_end_deploy | |
task :say_begin_deploy do | |
`say deploying #{ARGV[0]}` | |
end |
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 | |
require 'rubygems' | |
require 'net/https' | |
require 'uri' | |
require 'json' | |
require 'enumerator' | |
require "daemons" | |
# EDIT POST_RECEIVE_URL |
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
rake metrics:all > /dev/null 2>&1 && cp -r tmp/metric_fu/output /srv/deploy/integrity/public/metrics-`git rev-parse --short HEAD` && echo "To see metrics, go to https://integrity.example.com/metrics-`git rev-parse --short HEAD`/" |
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
rake metrics:all > /dev/null 2>&1 && cp -r tmp/metric_fu/output /srv/deploy/integrity/public/metrics-`git rev-parse --short HEAD` && echo "To see metrics, go to https://integrity.example.com/metrics-`git rev-parse --short HEAD`/" |
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
public class Key { | |
protected SecretKey key; | |
public Key(String password, String salt) throws NoSuchAlgorithmException, InvalidKeySpecException { | |
PBEKeySpec ks = new PBEKeySpec(password.toCharArray(), salt.getBytes(), 1000); | |
SecretKeyFactory kf = SecretKeyFactory.getInstance("PBEWithSHA1AndDESede"); | |
key = kf.generateSecret(ks); | |
} |
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 de.samedi.searcher; | |
import static org.junit.Assert.assertEquals; | |
import static org.junit.Assert.fail; | |
import java.io.IOException; | |
import org.apache.lucene.analysis.standard.StandardAnalyzer; | |
import org.apache.lucene.document.Document; |
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
ld warning: option -s is obsolete and being ignored |
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
# when i "use" the not-too good installed jruby | |
rvm use jruby --debug | |
+ case "$action" in | |
+ rvm-use jruby | |
+ implementation=jruby | |
+ case "$implementation" in | |
+ version=1.3.1 | |
+ '[' 1.3.1 = 1.2.0 -o 1.3.1 = 1.3.1 ']' | |
+ MY_RUBY_HOME=/Users/micha/.rvm/jruby-1.3.1 |
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
rvm use jruby --debug | |
+ case "$action" in | |
+ rvm-use jruby | |
+ implementation=jruby | |
+ case "$implementation" in | |
+ version=1.3.1 | |
+ '[' 1.3.1 = 1.2.0 -o 1.3.1 = 1.3.1 ']' | |
+ MY_RUBY_HOME=/Users/micha/.rvm/jruby-1.3.1 | |
+ GEM_HOME=/Users/micha/.gem/jruby/1.8 | |
+ alias 'ruby_ng=jruby --ng' |
OlderNewer