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
# switch C-b -> C-a | |
set -g prefix C-a | |
unbind C-b | |
bind C-a send-prefix | |
# quick pane cycling | |
unbind ^A | |
bind ^A select-pane -t :.+ | |
# mouse support |
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
(defn assert-valid [spec-check] | |
(let [failure (-> spec-check first :failure)] | |
(is (nil? failure)))) | |
(deftest manifest | |
(let [find-spec (s/fspec :args (s/cat :id ::submission-directory/id) | |
:ret (s/or :found ::submission-directory/submission-directory :not-found nil?))] | |
(stest/instrument ['submissions-svr.db.submission-directories/find `submission/manifest-files] | |
{:spec {'submissions-svr.db.submission-directories/find find-spec} |
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
/* selenium webdriver safari 10 OSX Sierra testing | |
[Error] Failed to load resource: The network connection was lost. | |
Note: Script is unable to capture console log errors. Error occurs | |
when page is blank | |
Error occurs for the following urls | |
https://authors.aps.org/Submissions | |
https://authors.staging.aps.org/Submissions | |
========================================================================================== | |
Running script: | |
Install node js v7.2.0 |
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 BackgroundJobWatcher | |
attr_accessor :mailer, :error_io | |
class << self | |
def attempt(job_name, &blk) | |
new.attempt(job_name, &blk) | |
end | |
end | |
def initialize(opts = {}) |
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
dir = ARGV[0] | |
raise "Usage: #{$0} <DIR>" if dir.nil? | |
Dir[File.join(dir, '**/*.haml')].each do |f| | |
s = File.read(f) | |
lines = [] | |
s.each_line do |l| | |
l = l.gsub('&=', '=') |
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
describe ResubmissionsController do | |
... | |
# Probably not the most ideal start-off point | |
# since it is fairly rare un-RESTFul action, but.... | |
describe '#mark_as_processed' do | |
it 'responds with 404:not_found when no matching resubmissions were found' do | |
Resubmission.should_receive(:mark_as_processed).with('aa1001').and_return(0) | |
do_get('aa1001') | |
response.status.should == 404 | |
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
module WordListMacros | |
def it_strips_double_quotes | |
it "strips double quotes" do | |
subject.list_of_words = %w("foo" "bar") | |
subject.list_of_words.should eq(%w(foo bar)) | |
end | |
end | |
def it_strips_single_quotes | |
it "strips single quotes" do |
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 JavaClasspath | |
class << self | |
def bootstrap(jar_dirs, classpath_dirs) | |
jar_dirs.each do |jardir| | |
Dir.entries(jardir).grep(/\.jar$/) {|jar| add_expanded_path(File.join(jardir, jar))} | |
end | |
classpath_dirs.each do |cp_dir| | |
add_expanded_path(cp_dir) |
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 org.aps.webprowo.hibernate; | |
import java.util.ArrayList; | |
import java.util.Iterator; | |
import java.util.Vector; | |
import org.apache.log4j.Appender; | |
import org.apache.log4j.AppenderSkeleton; | |
import org.apache.log4j.spi.LoggingEvent; | |
import org.aps.eop.dao.DataAccessUtils; |
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 interface TxCallback { | |
public Object execute(TransactionHolder txHolder) throws Exception; | |
} |
NewerOlder