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
#!/bin/bash | |
# Check prerequisites for docker | |
if [ "$(uname -m)" != "x86_64" ]; then | |
echo "Docker requires 64 bit host OS" | |
exit 1 | |
fi | |
kernel_version=$(uname -r | cut -d '.' -f 1-2) |
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
#!/bin/sh | |
find */spec -type f \ | |
-name '*.rb' \ | |
-not -name '*_fabricator.rb' \ | |
-not -name '*_spec.rb' \ | |
-not -name 'spec_helper.rb' \ | |
-not -path '*/cassettes/*' \ | |
-not -path '*/dummy/*' \ | |
-not -path '*/expected/*' \ |
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
--- PKGBUILD.orig 2016-06-07 12:22:39.833418761 +0100 | |
+++ PKGBUILD 2016-06-07 13:42:49.653850504 +0100 | |
@@ -3,7 +3,6 @@ | |
# Contributor: Tianjiao Yin <ytj000(at)gmail(dot)(see)(oh)(em)> | |
# Contributor: Allan McRae <[email protected]> | |
-set -u | |
pkgname='gcc45' | |
pkgver='4.5.4' | |
pkgrel='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
#!/bin/sh | |
set -e # fail on errors | |
set -x # trace on | |
RUNLIST="$1" # eg 'recipe[example],role[something]' | |
cd /tmp/kitchen | |
[ -f client.pem ] || ssh-keygen -P '' -f client.pem | |
sudo /opt/chef/embedded/bin/gem install chef-zero -v '4.5.0' # last version to not enforce ruby version >= 2.1.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
#!/bin/bash | |
# usage: bash /tmp/upstart_fix_pid.sh <pid> | |
sleep 0.001 & | |
firstPID=$! | |
# exhaust the pid space | |
while (( $! >= $firstPID )) | |
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 Year | |
def self.leap?(year) | |
if year % 4 == 0 || year % 400 == 0 | |
if year % 100 == 0 && year % 400 == 0 | |
true | |
elsif year % 100 == 0 | |
false | |
else | |
true | |
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 AssertException (assertException, assertErrorCall) where | |
import Control.Exception (ErrorCall(..), Exception, handleJust, SomeException(..)) | |
import Control.Monad (guard) | |
import Test.HUnit (assertFailure) | |
import System.IO (hPutStrLn, stderr) | |
assertException :: (Exception e, Eq e) => e -> IO a -> IO () | |
assertException ex action = | |
handleJust isWanted (const $ return ()) $ 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
Consuming test message fc8104a8-3b4d-4940-a26c-5f9e61cb5d4c | |
message(fc8104a8-3b4d-4940-a26c-5f9e61cb5d4c): error in consumer 'TestConsumer' | |
message(fc8104a8-3b4d-4940-a26c-5f9e61cb5d4c): TypeError - String can't be coerced into Float | |
backtrace: | |
/home/vagrant/v2_vendor/service-order/bundle/ruby/2.0.0/bundler/gems/v2-queue-b3558fd59db3/lib/fatsoma/queue/consumer.rb:87:in `*' | |
/home/vagrant/v2_vendor/service-order/bundle/ruby/2.0.0/bundler/gems/v2-queue-b3558fd59db3/lib/fatsoma/queue/consumer.rb:87:in `randomise_by_percent' | |
/home/vagrant/v2_vendor/service-order/bundle/ruby/2.0.0/bundler/gems/v2-queue-b3558fd59db3/lib/fatsoma/queue/consumer.rb:69:in `next_expiration' | |
/home/vagrant/v2_vendor/service-order/bundle/ruby/2.0.0/bundler/gems/v2-queue-b3558fd59db3/lib/fatsoma/queue/consumer.rb:48:in `republish' | |
/home/vagrant/v2_vendor/service-order/bundle/ruby/2.0.0/bundler/gems/v2-queue-b3558fd59db3/lib/fatsoma/queue/consumer.rb:33:in `rescue in process' | |
/home/vagrant/v2_vendor/service-order/bundle/ruby/2.0.0/bundler/gem |
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
diff --git ext/readline/extconf.rb ext/readline/extconf.rb | |
index 4920137..8e81253 100644 | |
--- ext/readline/extconf.rb | |
+++ ext/readline/extconf.rb | |
@@ -19,6 +19,10 @@ def readline.have_func(func) | |
return super(func, headers) | |
end | |
+def readline.have_type(type) | |
+ return super(type, headers) |
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
AccessModifierIndentation: | |
Enabled: false | |
AccessorMethodName: | |
Enabled: false | |
ClassAndModuleChildren: | |
Exclude: | |
- '**/lib/client/*/concerns/**' |