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
# ghi is a GitHub issues CLI https://github.com/stephencelis/ghi | |
# fzf is "A command-line fuzzy finder" https://github.com/junegunn/fzf | |
# Usage: | |
# Image you need to comment on an issue but you dont remember its number. | |
# Instead of searching for the number first and then typing "ghi edit <number>", | |
# use the fzf fuzzy complete function: | |
# | |
# ghi comment **<TAB> | |
# |
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
Naive thinking of ways to represent @getguesstimate spreadsheets as text.... | |
Using http://www.getguesstimate.com/models/314 as an example | |
in YML | |
count_meltdowns: | |
label: Number of meltdowns | |
formula: normal(0,2) # distributions use function notation? | |
minutes_per_meltdown: |
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 merge-left [& maps] | |
(apply merge-with (cons (fn [old _] old) maps))) |
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
;; require the following: | |
;; [cljs-http.client :as http] | |
;; [cljs-http.core :as http-core] | |
;; | |
;; put-url must be a presigned URL generated by something like | |
;; http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/s3/AmazonS3Client.html#generatePresignedUrl(com.amazonaws.services.s3.model.GeneratePresignedUrlRequest) | |
(defn put-file [content-type file-obj put-url] | |
(let [req {:request-method "PUT" | |
:headers {"content-type" content-type} |
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
-- make a workflow, call it with "task name +days" | |
on alfred_script(q) | |
if application "Things" is running then | |
else | |
tell application "Things" to activate | |
tell application "Finder" | |
set visible of process "Things" to false | |
end tell | |
delay 1 |
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
function readWholeStdin() { | |
process.stdin.resume(); | |
process.stdin.setEncoding('utf8'); | |
var buffer = ''; | |
process.stdin.on('data', function(chunk) { | |
buffer += chunk; | |
}); | |
var deferred = Q.defer(); | |
process.stdin.on('end', function() { |
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
/* | |
* rename /bin/sh to /bin/sh.org for the script to work | |
* | |
* compile with 'gcc -Wall sh-wrap.c -o sh-wrap' | |
* | |
* can do same for bash | |
*/ | |
#include <unistd.h> | |
#include <stdio.h> |
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
# * uncommitted changes | |
# ^ stashed changes | |
# > ahead of origin | |
# < behind origin | |
# ↕ diverged from origin | |
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" | |
} |