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
package com.mikerowecode.robot8; | |
import java.util.Scanner; | |
import java.util.StringTokenizer; | |
import java.util.function.Function; | |
public class Robots { | |
public static void main(String[] args) { | |
Robot robot = new Robot(-1, -1, Direction.WEST); | |
Scanner in = new Scanner(System.in); |
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
folder-hook REA 'macro pager \Cd '<pipe-message>~/dotfiles/mutt/view_git_patch.sh^M' |
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
vagrant@ubuntu-14:~$ sudo apt-get install npm | |
Reading package lists... Done | |
Building dependency tree | |
Reading state information... Done | |
The following extra packages will be installed: | |
build-essential g++ g++-4.8 gyp javascript-common libc-ares-dev libc-ares2 libjs-node-uuid libssl-dev libssl-doc libstdc++-4.8-dev | |
libv8-3.14-dev libv8-3.14.5 node-abbrev node-ansi node-archy node-async node-block-stream node-combined-stream node-cookie-jar | |
node-delayed-stream node-forever-agent node-form-data node-fstream node-fstream-ignore node-github-url-from-git node-glob node-graceful-fs | |
node-gyp node-inherits node-ini node-json-stringify-safe node-lockfile node-lru-cache node-mime node-minimatch node-mkdirp node-mute-stream | |
node-node-uuid node-nopt node-normalize-package-data node-npmlog node-once node-osenv node-qs node-read node-read-package-json 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
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: skeleton | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Example initscript | |
# Description: This file should be used to construct scripts to be | |
# placed in /etc/init.d. |
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
ubuntu@ip-10-37-9-206:~$ sudo apt-get install xmonad | |
Reading package lists... Done | |
Building dependency tree | |
Reading state information... Done | |
The following extra packages will be installed: | |
binutils cpp cpp-4.8 fontconfig-config fonts-dejavu-core gcc gcc-4.8 ghc ghc-doc ghc-haddock libasan0 libatomic1 libbsd-dev libc-dev-bin libc6-dev libcloog-isl4 libdrm-intel1 | |
libdrm-nouveau2 libdrm-radeon1 libexpat1-dev libffi-dev libfontconfig1 libfontconfig1-dev libfontenc1 libfreetype6-dev libgcc-4.8-dev libghc-data-default-dev libghc-data-default-doc | |
libghc-dlist-dev libghc-dlist-doc libghc-extensible-exceptions-dev libghc-mtl-dev libghc-mtl-doc libghc-random-dev libghc-transformers-dev libghc-transformers-doc | |
libghc-utf8-string-dev libghc-x11-dev libghc-x11-doc libghc-x11-xft-dev libghc-x11-xft-doc libghc-xmonad-contrib-dev libghc-xmonad-contrib-doc libghc-xmonad-dev libghc-xmonad-doc | |
libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa libgmp-dev libgmpxx4ldbl libgomp1 libice-dev libice6 libisl10 libitm1 libllvm3. |
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 test.core | |
(:gen-class)) | |
(def AGENT (agent "foo")) | |
(defn do-thing [a b] | |
(str a "=" b)) | |
(defn -main | |
"" |
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
Ready to have kids?? take the test! | |
Test 1: Preparation | |
Women: To prepare for pregnancy: | |
1.Put on a dressing gown and stick a beanbag down the front. | |
2.Leave it there. | |
3.After nine months, remove 5 per cent of the beans. | |
Men: To prepare for children: | |
1.Go to a local chemist. Tip the contents of your wallet on to the counter and tell the pharmacist to help himself. | |
2.Go to the supermarket. Arrange to have your salary paid directly to its head office. | |
3.Go home. Pick up the newspaper and read it for the last time. |
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
def ec2 | |
Fog::Compute.new(:provider => 'AWS', | |
:aws_secret_access_key => ENV['EC2_SECRET_KEY'], | |
:aws_access_key_id => ENV['EC2_ACCESS_KEY']) | |
end | |
def tenured? (instance) | |
instance.created_at && (instance.created_at < Chronic.parse('50 minutes ago')) | |
end |
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
(deftest ^:integration instance-lifecycle | |
(testing "create instance" | |
(def result (POST "/instances" (with-principal {:name "rea-ec2-tests/int-test-micro", :instance-type "t1.micro"}))) | |
(has-status result 200) | |
(let [id (first (:body result))] | |
(prn (str "Created instance " id)) | |
(testing "get instance" |
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
;; Based on a queue polling function from Chas Emerick's bandalore: | |
;; https://github.com/cemerick/bandalore/blob/master/src/main/clojure/cemerick/bandalore.clj#L124 | |
(defn wait-for | |
"Invoke predicate every interval (default 10) seconds until it returns true, | |
or timeout (default 150) seconds have elapsed. E.g.: | |
(wait-for #(< (rand) 0.2) :interval 1 :timeout 10) | |
Returns nil if the timeout elapses before the predicate becomes true, otherwise |