Skip to content

Instantly share code, notes, and snippets.

View doxavore's full-sized avatar

Doug Mayer doxavore

View GitHub Profile
[INFO] --- jruby-maven-plugin:0.28.4:jruby (perform-assembly) @ torquebox-build-assembly ---
[INFO] TorqueBox.... 2.2.0-SNAPSHOT
[INFO] JBoss........ 7.1.x.incremental.129
[INFO] JRuby........ 1.7.0
[INFO] Polyglot..... 1.9.0-SNAPSHOT
[INFO] Stilts....... 0.1.28
[INFO] Maven repo: /Users/doug/.m2/repository
@doxavore
doxavore / dist_error.log
Created November 1, 2012 14:33
Failing TorqueBox local build
[INFO] ------------------------------------------------------------------------
[INFO] Building TorqueBox Build Distribution 2.2.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-enforcer-plugin:1.0-beta-1:enforce (enforce-java-version) @ torquebox-dist ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.0-beta-1:enforce (enforce-maven-version) @ torquebox-dist ---
[INFO]
[INFO] --- maven-source-plugin:2.1.2:jar-no-fork (attach-sources) @ torquebox-dist ---
[INFO]
@doxavore
doxavore / server.log
Created October 31, 2012 21:25
TorqueBox 2.1.2 not finding secret on redeploy
16:22:56,554 ERROR [stderr] (http-/10.8.1.32:8080-2)
16:22:56,555 ERROR [stderr] (http-/10.8.1.32:8080-2) ArgumentError (A secret is required to generate an integrity hash for cookie session data. Use config.secret_token = "some secret phrase of at least 30 characters"in config/initializers/secret_token.rb):
16:22:56,555 ERROR [stderr] (http-/10.8.1.32:8080-2) /data/myapp/shared/bundle/jruby/1.9/gems/actionpack-3.2.8/lib/action_dispatch/middleware/cookies.rb:320:in `ensure_secret_secure'
16:22:56,555 ERROR [stderr] (http-/10.8.1.32:8080-2) /data/myapp/shared/bundle/jruby/1.9/gems/actionpack-3.2.8/lib/action_dispatch/middleware/cookies.rb:282:in `initialize'
16:22:56,555 ERROR [stderr] (http-/10.8.1.32:8080-2) /data/myapp/shared/bundle/jruby/1.9/gems/actionpack-3.2.8/lib/action_dispatch/middleware/cookies.rb:229:in `signed'
16:22:56,555 ERROR [stderr] (http-/10.8.1.32:8080-2) /data/myapp/shared/bundle/jruby/1.9/gems/actionpack-3.2.8/lib/action_dispatch/middleware/session/cookie_store.rb:53:in `unpacke
@doxavore
doxavore / cruby_out.txt
Created October 19, 2012 21:00
Nokogiri 1.5.5: CRuby vs JRuby
<?xml version="1.0"?>
<D:multistatus xmlns:D="DAV:">
<D:response>
<D:href>some url one</D:href>
</D:response>
<D:response>
<D:href>some url two</D:href>
</D:response>
</D:multistatus>
TorqueBox.configure do
web do
context "/"
static "public"
end
ruby do
version "1.9"
end
#! /usr/bin/env python
import fileinput
import argparse
from operator import itemgetter
parser = argparse.ArgumentParser()
parser.add_argument('--target-mb', action = 'store', dest = 'target_mb', default = 61000, type = int)
parser.add_argument('vmtouch_output_file', action = 'store', nargs = '+')
args = parser.parse_args()
@doxavore
doxavore / gist:3758520
Created September 20, 2012 21:40
RubyMotion 1.23 and iOS 6 (latest XCode)
% rake spec --trace
================================================================================
A new version of RubyMotion is available. Run `sudo motion update' to upgrade.
================================================================================
** Invoke spec (first_time)
** Execute spec
** Invoke simulator (first_time)
** Invoke build:simulator (first_time)
** Execute build:simulator
@doxavore
doxavore / gist:3722096
Created September 14, 2012 14:07
Convert all CoffeeScript files to JavaScript

Is this really necessary? It seems like a bit of work...

In Vim, make all comments stick:

:arg **/*.js.coffee
:argdo %s/^\(\s*\)#/\1#!/ge

Compile from CoffeeScript to JavaScript (npm install -g coffee-script):

± % torquebox run -J "\-Xmx2048m \-Xms1024m \-Xmn512m \-XX:+TieredComplication"
/bin/sh bin/standalone.sh -Djruby.home=/Users/doug/.rbenv/versions/jruby-1.6.7.2
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /Users/doug/.rbenv/versions/jruby-1.6.7.2/lib/ruby/gems/1.8/gems/torquebox-server-2.1.0-java/jboss
JAVA: java
@doxavore
doxavore / benchmark.rb
Created May 14, 2012 22:04 — forked from panthomakos/benchmark.rb
Benchmark Your Bundle
#!/usr/bin/env ruby
require 'benchmark'
REGEXPS = [
/^no such file to load -- (.+)$/i,
/^Missing \w+ (?:file\s*)?([^\s]+.rb)$/i,
/^Missing API definition file in (.+)$/i,
/^cannot load such file -- (.+)$/i,
]