Skip to content

Instantly share code, notes, and snippets.

@mrowe
mrowe / nodes.clj
Created January 8, 2013 05:54
Rerender GET on POST on validation error
(defn create-form [{:keys [env name type]}]
(common/layout
[:h2 (str "Create instance in " env)]
(form-to [:post (str "/environments/" env "/create")]
(hidden-field "env" env) (hidden-field "principal" "web-ui")
(instance-fields name type)
(submit-button "Create"))))
(defroutes node-routes
@mrowe
mrowe / job1273.md
Created November 26, 2012 04:10
Senior Software and Systems Engineer

We are home to Australia’s No.1 residential and commercial property websites, realestate.com.au and realcommercial.com.au. In the international marketplace, we operate the market-leading Italian property site, casa.it.

As Australia’s leading online property company, we pride ourselves on outstanding products and innovative thinking. We recognise that to continue to be the best in the business, we need to have the best people in the business. That’s where you come in.

As a technology focused business we pride ourselves on a forward thinking attitude, adoption of leading edge technologies and ways of working, such as agile and lean practices at scale, dev-ops, cloud adoption and award winning mobile apps. We also love to be involved in the IT community.

This current opportunity is in REA’s Delivery Services team. We’re a small cross-functional delivery team that provides direction and support to our Line of Business delivery teams in the use of our cloud environments, build engineering and tooling and specia

@mrowe
mrowe / anything-git-project-files.el
Created August 2, 2012 01:17
Anything source to search files in current GIT project (http://www.emacswiki.org/emacs/AnythingSources#toc64)
(defvar anything-c-source-git-project-files-cache nil "(path signature cached-buffer)")
(defvar anything-c-source-git-project-files
'((name . "Files from Current GIT Project")
(init . (lambda ()
(let* ((git-top-dir (magit-get-top-dir (if (buffer-file-name)
(file-name-directory (buffer-file-name))
default-directory)))
(top-dir (if git-top-dir
(file-truename git-top-dir)
default-directory))
@mrowe
mrowe / gist:1927654
Created February 27, 2012 22:43
a simple gradient
background: #f1dec2;
background: url("edge.png") repeat-x; /* fallback */
background: url("edge.png") repeat-x, -webkit-gradient(linear, left top, left bottom, from(#ebc17f), to(#f1dec2)); /* Saf4+, Chrome */
background: url("edge.png") repeat-x, -webkit-linear-gradient(left, #ebc17f, #f1dec1); /* Chrome 10+, Saf5.1+ */
background: url("edge.png") repeat-x, -moz-linear-gradient(left, #ebc17f, #f1dec1); /* FF3.6+ */
background: url("edge.png") repeat-x, -ms-linear-gradient(left, #ebc17f, #f1dec1); /* IE10 */
background: url("edge.png") repeat-x, -o-linear-gradient(left, #ebc17f, #f1dec1); /* Opera 11.10+ */
background: url("edge.png") repeat-x, linear-gradient(left, #ebc17f, #f1dec1); /* W3C */
@mrowe
mrowe / gist:1494680
Created December 18, 2011 22:31
iiNet DNS problems
$ dig PTR 169.41.170.124.in-addr.arpa.
; <<>> DiG 9.7.3-P3 <<>> PTR 169.41.170.124.in-addr.arpa.
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 43719
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;169.41.170.124.in-addr.arpa. IN PTR
#!/usr/bin/env ruby
require 'rubygems'
require 'fog'
require 'yaml'
environment = YAML.load_file(".rea-env.yml")
connection_details = {
:provider => "AWS",
:endpoint => environment["ec2"]["url"],
;;
;; Read a CSV file and look up the product ids it contains in a
;; database. Report all the products in the CSV that do not exist in
;; the database.
;;
;; Usage: $0 <path-to-csv-file>
;;
(import 'java.io.FileReader 'au.com.bytecode.opencsv.CSVReader)