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 jruby | |
# | |
# | |
require 'rubygems' | |
require 'spoon' | |
EXEC = '/tmp/exec.rb' | |
PID_PATH = '/tmp/exec.pid' | |
WORK_PATH = '/tmp/' |
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
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com | |
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below) | |
module Player | |
describe MovieList, "with optional description" do | |
it "is pending example, so that you can write ones quickly" | |
it "is already working example that we want to suspend from failing temporarily" do | |
pending("working on another feature that temporarily breaks this one") |
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 'rubygems' | |
require 'spoon' | |
Spoon.spawnp 'jruby', *ARGV |
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
--- | |
#### | |
#### THIS IS OLD AND OUTDATED | |
#### LIKE, ANSIBLE 1.0 OLD. | |
#### | |
#### PROBABLY HIT UP https://docs.ansible.com MY DUDES | |
#### | |
#### IF IT BREAKS I'M JUST SOME GUY WITH | |
#### A DOG, OK, SORRY | |
#### |
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 install jruby | |
jruby-1.6.7.2 - #downloading jruby-bin-1.6.7.2, this may take a while depending on your connection... | |
jruby-1.6.7.2 - #extracting jruby-bin-1.6.7.2 to /Users/tony/.rvm/src/jruby-1.6.7.2 | |
jruby-1.6.7.2 - #extracted to /Users/tony/.rvm/src/jruby-1.6.7.2 | |
jruby-1.6.7.2 - #nailgun | |
Error running 'jruby_install_build_nailgun', please read /Users/tony/.rvm/log/jruby-1.6.7.2/nailgun.log |
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 'queue' | |
module Rack | |
module Mongoid | |
module Middleware | |
class Sessions | |
def initialize(app) | |
@app = app | |
@sessions = Queue.new |
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 'queue' | |
# Simplified version of the pooling from datamapper's data_objects. | |
# https://github.com/datamapper/do/blob/master/data_objects/lib/data_objects/pooling.rb | |
class Moped::Session | |
class << self | |
alias new __new | |
end | |
@__pool_lock = Mutex.new |
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 foo.bar | |
import spray.routing._ | |
import spray.http._ | |
import spray.http.StatusCodes.Forbidden | |
// See https://developer.mozilla.org/en-US/docs/HTTP/Access_control_CORS | |
case class Origin(origin: String) extends HttpHeader { |
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 'thread' | |
require 'thread_safe' | |
require 'monitor' | |
module Mongoid | |
def with_session(&block) | |
Sessions.with_session(&block) | |
end | |
module Config | |
option :session_pool_size, :default => 5 |
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 | |
# | |
# Watch current directory (recursively) for file changes, and execute | |
# a command when a file or directory is created, modified or deleted. | |
# | |
# Written by: Senko Rasic <senko.rasic@dobarkod.hr> | |
# | |
# Requires Linux, bash and inotifywait (from inotify-tools package). | |
# | |
# To avoid executing the command multiple times when a sequence of |
OlderNewer