- Install VirtualBox on your machine
- Disable login credential: $ VBoxManage setproperty websrvauthlibrary null
- Download and uncompress the following image https://s3.amazonaws.com/vmfest-images/ubuntu-10-10-64bit-server.vdi.gz
- Clone the image to the directory where you want it to be permanently stored:
$ VBoxManage clonehd /path/to/downloaded/ubuntu-10-10-64bit-server.vdi /path/to/permanent/location/ubuntu...-server.vdi
- This should produce a uuid for your new image. Keep it around
- Start VirtualBox (the GUI) and:
- Create an new image Linux - Ubuntu (64bit)
- Select "Use existing hard disk" and if your newly cloned image doesn't appear in the drop-down list, click on the folder icon and find the image in your hard disk (the one you just cloned)
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
| (defmacro with-ssh-tunnel-> | |
| "Execute the body with an ssh-tunnel available for the ports given in the | |
| tunnels map. tunnels should be a map from local ports (integers) to either | |
| 1) An integer remote port. Remote host is assumed to be 'localhost'. | |
| 2) A vector of remote host and remote port. eg, [\"yahoo.com\" 80]. | |
| Automatically closes the connection (and port forwards) on completion." | |
| [request tunnels & body] | |
| `(clj-ssh/with-ssh-agent [(execute/default-agent)] | |
| (let [user# (:user ~request) | |
| node-address# (compute/node-address (:target-node ~request)) |
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
| (ns pallet-cascalog.core | |
| (:use [pallet.resource :only (phase)] | |
| [pallet.crate.automated-admin-user | |
| :only (automated-admin-user)]) | |
| (:require [pallet.core :as core] | |
| [pallet.compute :as compute] | |
| [pallet.crate.hadoop :as h] | |
| [pallet.crate.java :as j])) | |
| ;; Okay, here's the good stuff. We're trying to get a system up and |
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
| (ns pallet-cascalog.node | |
| (:use [pallet.thread-expr :only (for->)] | |
| [pallet.resource :only (phase)] | |
| [pallet.crate.automated-admin-user | |
| :only (automated-admin-user)]) | |
| (:require pallet.compute.vmfest | |
| [pallet.core :as core] | |
| [pallet.compute :as compute] | |
| [pallet.crate.hadoop :as hadoop] | |
| [pallet.crate.java :as java]) |
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
| (defn- hadoop-service | |
| "Run a Hadoop service" | |
| [request hadoop-daemon description] | |
| (let [hadoop-home (parameter/get-for-target request [:hadoop :home]) | |
| hadoop-user (parameter/get-for-target request [:hadoop :owner])] | |
| (-> | |
| request | |
| (exec-script/exec-checked-script | |
| (str "Start Hadoop " description) | |
| (as-user |
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
| (defn get-latest-twit [] | |
| (:text (first (:results (twitter/search "@jonromero"))))) |
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
| #!/usr/bin/env perl | |
| # You can use this script in a pipe. It's input will become an emacs buffer | |
| # via emacsclient (so you need server-start etc.) | |
| # See http://mark.aufflick.com/o/886457 for more information | |
| # Copyright (C) 2011 by Mark Aufflick <mark@aufflick.com> | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy |
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
| (ns sandbox.compress-jpg | |
| (meta {:description "change compression level without losing the metadata of a jpg file" | |
| :url "http://blog.carsoncheng.ca/2011/02/how-to-change-jpeg-compression-in.html"}) | |
| (:require clojure.java.io) | |
| (:import [javax.imageio IIOImage ImageIO] | |
| [javax.imageio.plugins.jpeg JPEGImageWriteParam])) | |
| (defn compress-jpg [inputFile outputFile compressionQuality] | |
| (let [image-reader (.next (ImageIO/getImageReadersByFormatName "jpg")) | |
| image-writer (.next (ImageIO/getImageWritersByFormatName "jpg"))] |
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
| (ns | |
| ^{:doc | |
| "Simple Theorem Prover 'Programming Language Theory and its Implementation' Michael J.C. Gordon" | |
| :author "Kenichi Kobayashi"} | |
| prover | |
| (:use [clojure.test]) | |
| (:require [clojure.walk :as cw])) | |
| (def constant #{'+ '- '< '<= '> '>= '* '= 'T 'F 'DIV 'not 'and 'or 'implies}) |
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
| (ns replproject.compojure | |
| (:use compojure.core | |
| ring.adapter.jetty) | |
| (:require [compojure.route :as route] | |
| [net.cgrand.enlive-html :as html])) | |
| (html/deftemplate index "index.html" | |
| [ctxt] | |
| [:p#message] (html/content (:message ctxt) )) |