Skip to content

Instantly share code, notes, and snippets.

letterleaf-provision.core=> (change 1 :vb)
12:47:26.987 [Thread-2] INFO pallet.compute.vmfest - No :default-bridged-interface defined. Will chose from these options: en1: AirPort
12:47:26.987 [Thread-2] INFO pallet.compute.vmfest - No Local Interface defined. Using vboxnet0
12:47:26.987 [Thread-2] INFO pallet.compute.vmfest - Loaded images: (:ubuntu-10-10-64bit-server :ubuntu-10-10)
12:47:26.987 [Thread-2] INFO pallet.compute.vmfest - Using 'local' networking via interface 'vboxnet0' as defaults for new machines
12:47:26.988 [Thread-2] DEBUG pallet.compute.vmfest - loaded model :micro = {:cpu-count 1, :storage [{:devices [nil nil nil nil], :name "IDE Controller", :bus :ide}], :boot-mount-point ["IDE Controller" 0], :memory-size 512}
12:47:26.988 [Thread-2] DEBUG pallet.compute.vmfest - loaded model :small = {:cpu-count 1, :storage [{:devices [nil nil nil nil], :name "IDE Controller", :bus :ide}], :boot-mount-point ["IDE Controller" 0], :memory-size 1024}
12:47:26.988 [Thread-2] DEBUG pallet.compute.vmfest
09:52:56.252 [main] INFO pallet.compute.vmfest - No :default-bridged-interface defined. Will chose from these options: en1: AirPort
09:52:56.255 [main] INFO pallet.compute.vmfest - No Local Interface defined. Using vboxnet0
09:52:56.271 [main] INFO pallet.compute.vmfest - Loaded images: (:ubuntu-10-10-64bit-server :ubuntu-10-10)
09:52:56.272 [main] INFO pallet.compute.vmfest - Using 'local' networking via interface 'vboxnet0' as defaults for new machines
09:52:56.331 [main] DEBUG pallet.compute.vmfest - loaded model :micro = {:cpu-count 1, :storage [{:devices [nil nil nil nil], :name "IDE Controller", :bus :ide}], :boot-mount-point ["IDE Controller" 0], :memory-size 512}
09:52:56.332 [main] DEBUG pallet.compute.vmfest - loaded model :small = {:cpu-count 1, :storage [{:devices [nil nil nil nil], :name "IDE Controller", :bus :ide}], :boot-mount-point ["IDE Controller" 0], :memory-size 1024}
09:52:56.332 [main] DEBUG pallet.compute.vmfest - loaded model :medium = {:cpu-count 2, :storage [{:devices [nil nil n
(ns letterleaf-provision.core
(:use [clojure.tools.cli])
(:require [pallet.core :as core]
[pallet.compute :as compute]
[pallet.phase :as phase]
[pallet.crate.java :as java]
[pallet.crate.automated-admin-user :as automated-admin-user]))
(defn service [provider]
(compute/service provider))
@blakesmith
blakesmith / .palletservicesvirtualbox.clj
Created March 30, 2012 12:11
jclouds null pointer exception
{:vb {:provider "virtualbox"
:images {:ubuntu-10-10 {:description "Ubuntu 10.10 64bit"
:uuid "ea8d17cd-d532-4ce4-82de-d201d773f9d1"
:os-family :ubuntu
:os-version "10.10"
:os-type-id "Ubuntu"
:os-64-bit true
:sudo-password "superduper"
:no-sudo false
:username "user"
#!/usr/bin/env ruby
require 'rubygems'
require 'typhoeus'
100000.times do |t|
Thread.new do
puts "requesting - #{t}"
@req = Typhoeus::Request.new("http://#{ARGV[0]}:#{ARGV[1]}",
:method => :post,
; SLIME 20100404
user> (read-line)
nil
user>
@blakesmith
blakesmith / gist:1587593
Created January 10, 2012 07:08
Simple pallet script
(ns pallet-test.core
(:use
[clojure.contrib.command-line])
(:require
[pallet.core :as core]
[pallet.compute :as compute]
[pallet.phase :as phase]
[pallet.crate.java :as java]
[pallet.crate.automated-admin-user :as automated-admin-user]))
user=> [0xE2 0x80 0x99]
[226 128 153]
user=> (String. (into-array Integer/TYPE [0xE2 0x80 0x99]) 0 3)
"???"
user=>
(defn read-bytes [input-stream n]
(loop [coll [] bytes-read 0]
(let [next-byte (.read input-stream)]
(if (or (= next-byte -1) (= bytes-read n))
coll
(recur (conj coll next-byte) (inc bytes-read))))))
user=> (read-bytes is 3)
[99 104 112]
notification-realtime.core=> (require '[clj-hector.core :as hector])
nil
notification-realtime.core=> (def cluster (hector/cluster "collectstream cluster" "localhost"))
java.lang.NoSuchMethodError: org.slf4j.helpers.MessageFormatter.format(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/String; (NO_SOURCE_FILE:3)