This file contains 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 | |
set -e | |
LIST=$1; | |
DUE=$2; | |
WUNDERLISTDB="$HOME/Library/Containers/com.wunderkinder.wunderlistdesktop/Data/Library/Application Support/Wunderlist/WKModel.sqlite" | |
if [ "$LIST" == 'Inbox' ]; then | |
LID="AND ZTASKLIST is null"; |
This file contains 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/bash | |
# NOTE: requires ImageMagick | |
# NOTE: will tint to the Solarized Dark default background scheme, as the iTerm background blend option didn't lower the contrast enough for me | |
# NOTE: Optimised for a 1280x800 point screen (my 13" Retina MBP) | |
set -e | |
index=$[ 1 + $[ RANDOM % 10 ]] | |
img=`curl https://unsplash.com/rss/ | xmllint --xpath '/rss/channel/item['$index']/image/url/text()' -` | |
curl "$img" > ~/unsplash-latest.jpg && |
This file contains 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/bash | |
if [ ! -z "$(find ~/.mail/*/INBOX -type f)" ]; then | |
printf '📥 ' | |
for box in `ls ~/.mail | grep -v temp`; do | |
emails=$(find ~/.mail/$box/INBOX -type f | wc -l) | |
[ $emails -ne 0 ] && printf '%s:%d ' ${box:0:1} $emails | |
done | |
printf '~\n' | |
fi |
This file contains 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 ruby | |
require 'builder' | |
require 'sinatra' | |
require 'action_view' | |
include ActionView::Helpers::DateHelper | |
get '/' do | |
date = Time.parse(`git show -s --format=%ci`.chomp) |
This file contains 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
class CodePoint | |
def initialize(b) | |
@b = b | |
end | |
def hex | |
@b.to_s(16) | |
end | |
def char_windows |
This file contains 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
git status --porcelain | grep 'test' | grep -v 'factories' | cut -c4- | sort | uniq | xargs zeus test |
This file contains 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
diff --git a/app/account.rb b/app/account.rb | |
index a108685..c89ad34 100644 | |
--- a/app/account.rb | |
+++ b/app/account.rb | |
@@ -1,4 +1,22 @@ | |
+require 'open-uri' | |
+ | |
module Sol | |
+ class Url | |
+ def self.get(url) |
This file contains 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
Given /^an employee called "([^"]+)"$/ do |employee_name| | |
create_employee(employee_name) | |
end | |
Then /^I should be able to pay "([^"]+)" his salary$/ do |employee_name| | |
pay_salary_to(employee_) | |
end |
This file contains 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
Given /^an employee called "([^"]+)"$/ do |employee_name| | |
create_employee(employee_name) | |
end | |
Then /^I should be able to pay "([^"]+)" his salary$/ do |employee_name| | |
pay_salary_to(employee_) | |
end |
This file contains 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
Feature: Paul pays employees | |
In order to retain staff | |
As Paul the Payroll Manager I want to pay my staff | |
Scenario: | |
Given an admin user called "Paul" with a password "password" | |
And a user called "Bob" | |
And "Bob" is an employee | |
And "Bob" gets paid "$2,000" a month | |
When I visit the homepage |