Skip to content

Instantly share code, notes, and snippets.

View michaelklishin's full-sized avatar

Michael Klishin michaelklishin

View GitHub Profile
@michaelklishin
michaelklishin / gist:2046014
Created March 15, 2012 18:54 — forked from akitaonrails/gist:1724673
Fixing Apachebench on OS X Lion
# If you're getting this error trying to use ApacheBench on OS X Lion:
# Benchmarking mwmanning.com (be patient)...apr_socket_recv: Connection reset by peer (54)
#
# You need to download the latest beta version of Apache and rebuild ab.
# Here's how (assuming you have homebrew installed).
# Install Homebrew (https://github.com/mxcl/homebrew) and then the Perl Regex support
brew install pcre
# Download the latest from http://httpd.apache.org/download.cgi, then decompress and compile it
diff --git a/leiningen-core/src/leiningen/core/main.clj b/leiningen-core/src/leiningen/core/main.clj
index 5162578..64cee91 100644
--- a/leiningen-core/src/leiningen/core/main.clj
+++ b/leiningen-core/src/leiningen/core/main.clj
@@ -31,8 +31,8 @@
(apply println msg)
(exit 1)))
-(defn ^:no-project-needed task-not-found [& _]
- (abort "That's not a task. Use \"lein help\" to list all tasks."))
Caused by: org.codehaus.plexus.component.repository.exception.ComponentRepositoryException:
Component descriptor role: 'org.sonatype.plexus.components.sec.dispatcher.SecDispatcher',
implementation: 'org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher', role hint: 'maven' has a hint,
but there are other implementations that don't
(defstates automata :initial :intermediate :final)
(deftransition automate to-intermediate
:from :initial
:to :intermediate
;; will raise IllegalStateException if guard returns false
:guard-fn valid?
;; callbacks
:before-fn log-transition :after-fn launch-missles)
@michaelklishin
michaelklishin / gist:1715167
Created February 1, 2012 04:48
Pick a first available port to bind to with Clojure
(defn- first-available-port
[]
;; java.net.ServerSocket bound to port 0 will pick the first available port automatically
;; http://docs.oracle.com/javase/6/docs/api/java/net/ServerSocket.html#ServerSocket(int).
(let [ss (java.net.ServerSocket. 0)
port (.getLocalPort ss)]
(.close ss)
port))
env: ruby
ruby:
log_level: info
amqp:
host: localhost
port: 5672
username: travis_worker
password: travis_worker_password
virtual_host: travis.development
vms:
Rubinius Crash Report #rbxcrashreport
Error: signal SIGSEGV
[[Backtrace]]
bin/rbx[0x819f1c5]
[0xb784a400]
bin/rbx(_ZN8rubinius7ImmixGC10saw_objectEPNS_6ObjectE+0x41)[0x8369391]
bin/rbx(_ZN8rubinius16GarbageCollector11scan_objectEPNS_6ObjectE+0x38)[0x8365678]
bin/rbx(_ZN8rubinius7ImmixGC7collectERNS_6GCDataE+0x275)[0x8367525]
antares@marzo ~/Development/Opensource/travis-boxes.git
% be thor travis:base:build
$ vagrant basebox build 'natty32'
We did not find an isofile in <currentdir>/iso.
The definition provided the following download information:
- Download url: http://releases.ubuntu.com/11.04/ubuntu-11.04-server-i386.iso
- Md5 Checksum: ce1cee108de737d7492e37069eed538e
(ns clojurewerkz.quartzite.test.execution
(:use [clojure.test])
(:require [clojurewerkz.quartzite.scheduler :as sched]
[clojurewerkz.quartzite.jobs :as j]
[clojurewerkz.quartzite.triggers :as t]
[clojurewerkz.quartzite.schedule.simple :as s]))
(def latch (java.util.concurrent.CountDownLatch. 10))
(defrecord AJob []
describe "An AMQP consumer that DOES NOT catch exceptions" do
let(:connection) { HotBunnies.connect }
let(:channel) { connection.create_channel }
after :each do
channel.close
connection.close
end
it "becomes inactive" do