This file contains hidden or 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
| ## | |
| # This is the ugly work-around for working with gems from local source. | |
| # Comment in as required, and then run 'bundle update'. | |
| ### | |
| # gem 'sia_squirrel', :path => 'c:/dev/repos/gems/sia_squirrel', :require => 'sia_squirrel' | |
| # gem 'sia_beaver', :path => 'c:/dev/repos/gems/sia_beaver', :require => 'sia_beaver' | |
| # gem 'sia_crypto', :path => 'c:/dev/repos/gems/sia_crypto', :require => 'sia_crypto' | |
| gem 'sia_squirrel' | |
| gem 'sia_beaver' | |
| gem 'sia_crypto' |
This file contains hidden or 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 Minesweeper | |
| class Game | |
| attr_reader :fields | |
| def initialize | |
| @fields = [] | |
| @allow_input = true |
This file contains hidden or 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
| 13:49:17,411 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "hermes-knob.yml" | |
| 13:49:17,442 INFO [org.torquebox.core] (MSC service thread 1-1) evaling: C:\dev\repos\hermes\torquebox.rb | |
| 13:49:17,442 ERROR [org.torquebox.core.runtime] (MSC service thread 1-1) Error during evaluation: require 'rubygems' | |
| require 'torquebox-configure' | |
| TorqueBox::Configuration::GlobalConfiguration.load_configuration( %q{C:\dev\repos\hermes\torquebox.rb} ).to_java: org.jruby.exceptions.RaiseException: (LoadError) Could not find blankslate (= 2.1.2.4) amongst [bundler-1.1.4, bundler-1.1.3, rake-0.9.2.2, rake-0.8.7, torquebox-2.0.3, torquebox-backstage-1.0.3, torquebox-cache-2.0.3-java, torquebox-capistrano-support-2.0.3, torquebox-configure-2.0.3-java, torquebox-core-2.0.3-java, torquebox-messaging-2.0.3-java, torquebox-naming-2.0.3-java, torquebox-no-op-2.0.3, torquebox-rake-support-2.0.3, torquebox-security-2.0.3-java, torquebox-stomp-2.0.3, torquebox-transactions-2.0.3, torquebox |
This file contains hidden or 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
| # -*- encoding: utf-8 -*- | |
| $:.push File.expand_path("../lib", __FILE__) | |
| require "sia_squirrel/version" | |
| Gem::Specification.new do |s| | |
| s.name = "x" | |
| s.version = X::VERSION | |
| s.authors = ["Ciaran Archer"] | |
| s.email = ["[email protected]"] | |
| s.homepage = "http://x.x.com" |
This file contains hidden or 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 X | |
| VERSION = '0.0.1' | |
| end |
This file contains hidden or 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 MyPrinter | |
| def self.print(str, times=1) | |
| p ((str + ' ') * times).strip | |
| end | |
| end |
This file contains hidden or 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
| # Always rollback transactions for all databases | |
| RSpec.configure do |c| | |
| c.around(:each) do |example| | |
| Sequel.transaction(SIASquirrel.databases.values, :rollback=>:always) { example.run } | |
| end | |
| end |
This file contains hidden or 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
| # create list of hosts | |
| cat content_vhosts.conf | grep ServerName | awk '{ print $2 }' | sort >> sorted_hosts.txt | |
| # health check for each | |
| # use cntlm proxy, max op time of 5s | |
| for host in `cat sorted_hosts.txt` | |
| do | |
| curl -sLk -x http://localhost:3128 -m 5 -w "$host : %{url_effective} %{http_code} in %{num_redirects} redirs\\n" $host -o /dev/null | |
| done |
This file contains hidden or 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
| def stub_save!(obj) | |
| obj.stub(:save!).and_return true if obj.respond_to? :save! | |
| end |
This file contains hidden or 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
| # http://henrik.nyh.se/2008/12/git-dirty-prompt | |
| # http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/ | |
| # username@Machine ~/dev/dir[master]$ # clean working directory | |
| # username@Machine ~/dev/dir[master*]$ # dirty working directory | |
| function parse_git_dirty { | |
| [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" | |
| } | |
| function parse_git_branch { | |
| git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/" |