Thanks to @mipearson for his help in compiling this extremely serious and meaningful list.
- Drawing Visio diagrams
- Project management
- Standards governance
- Analyzing technical requirements
- Attending meetings
- Tweeting
- Drinking
- Writing gists
package proovy; | |
import groovy.xml.dom.DOMCategory | |
import org.lobobrowser.html.parser.* | |
import org.lobobrowser.html.test.* | |
import javax.xml.parsers.DocumentBuilderFactory | |
import javax.xml.xpath.XPathFactory | |
import javax.xml.xpath.XPathConstants | |
import css2xpath.* |
# Found on the ZshWiki | |
# http://zshwiki.org/home/config/prompt | |
# | |
# As lifted from http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/ | |
function collapse_pwd { | |
echo $(pwd | sed -e "s,^$HOME,~,") | |
} | |
function prompt_char { |
# Gem idea, extracted from ResourceFull. Thoughts on the API? | |
class User < ActiveRecord::Base | |
named_scope :born_after, lambda {|date| | |
{ :conditions => ["birthdate >= ?", Date.parse(date)] } | |
} | |
query_set :filter do | |
filter_with_scope :active | |
queryable_with :email |
# def initialize(attributes = {}) | |
Pirate.new :name => "Greenbeard", :ship => "The Queen Anne's Renegotiation" | |
# def has_many(of_what, options = {}) | |
has_many :crew_members, :class_name => "Pirate", :foreign_key => "captain_id" | |
# def validates_presence_of(*arrrrrgs) | |
validates_presence_of :parrot, :peg_leg, :blank => false |
// Low level helper function for calling some API. | |
function callAPI(path, params) { | |
return $.get("/api/url" + path, params); | |
} | |
// High-level semantic function for retrieving widgets. Leverages the underlying | |
// API function but itself returns a promise. | |
function getAllWidgets(filter) { | |
var apiCall = callAPI("/widgets", $.extend(filter, { foo: "bar" })); |
(ns gol-clj.spec.core | |
(:use [gol-clj.core]) | |
(:use [speclj.core])) | |
(describe "Game state after a single step" | |
(it "is empty given an empty set of points" | |
(should= #{} (gol-step #{}))) | |
(it "is empty given only a single point" | |
(should= #{} (gol-step #{[0 0]}))) |
Thanks to @mipearson for his help in compiling this extremely serious and meaningful list.
<!-- Add these tags to the HEAD section of your page. --> | |
<link href="http://coderwall.com/stylesheets/jquery.coderwall.css" media="all" rel="stylesheet" type="text/css"> | |
<script src="http://coderwall.com/javascripts/jquery.coderwall.js"></script> | |
<!-- You also need to place a container where you'd like the Coderwall badges to render. --> | |
<section class="coderwall" data-coderwall-username="(your username)" data-coderwall-orientation="(vertical or horizontal)"></section> |
module FillInWysihtml5 | |
def fill_in_wysihtml5(label, opts={}) | |
page.execute_script <<-JAVASCRIPT | |
var id = $("label:contains(#{label})").attr("for"); | |
$("#" + id).data("wysihtml5").editor.setValue("#{opts[:with]}"); | |
JAVASCRIPT | |
end | |
end |
(ns persistable.async | |
(:import [persistable.core Persistable]) | |
(:require [persistable.core :as core])) | |
(defn async-persistable [wrapped] | |
(reify Persistable | |
(update [this id values] (future (core/update wrapped id values))) | |
(insert [this values] (future (core/insert wrapped values))) | |
(delete [this query] (future (core/delete wrapped query))) | |
(find-one [this query] (future (core/find-one wrapped query))) |