Skip to content

Instantly share code, notes, and snippets.

View devth's full-sized avatar
Deep Work

Trevor Hartman devth

Deep Work
View GitHub Profile
(defmacro l10 [& body]
(doseq [i (range 10)]
`(println 1)))
(macroexpand `(l10 (println i)))
(defmacro cmd-hook [prefix & exprs]
`(rh/add-hook
#'core/handle-command
(fn [~'callback ~'cmd ~'args]
(if (re-find ~prefix (s/lower-case ~'cmd))
(cond-let [~'p]
~@(map (fn [i#]
(if (instance? java.util.regex.Pattern i#)
`(re-find ~i# ~'args)
`~i#))
@devth
devth / Alfred decide.com search
Created December 14, 2011 19:28
Alfred custom search configuration for Decide.com

JIRA Rant

  • It doesn't immediately or easily answer the question: "what should I be working on right now, and in what exact order?" In order to make it do this I had to go write some custom SQL junk. I don't ever want to even look at custom SQL in a webapp. The whole point of an issue tracker is the answer this question.

  • Its UI is clunky and the webapp is extremely slow (nearly 5 seconds to load the Dashboard).

  • The keyboard shortcuts are a step in the right direction, but they're lacking. Look at Accunote to see how fast and efficient they could be.

  • It lacks a decent CLI. I tried a few and they're either broken or extremely slow with aweful commands (reminds me of AWS) that would need to be wrapped in custom shell functions/alaises. I looked into the API to possibly create my own but it looked like some nasty SOAP crap.

<div class="decide-model-lineage" data-id="30743409">
<ul>
<li class="news_and_rumors_item">
<a class="title" href="http://techcrunch.com/2011/10/04/apple-iphone-4s5-rumors-what-was-right-wrong-and-just-plain-crazy/">Apple iPhone 4S/5 Rumors: What Was Right, Wrong And Just Plain Crazy</a>
<div class="date">October 04</div>
<p>
Rumors and speculation run wild prior to any Apple event and most often the announced product does not live up to the hype. That's essentially what happened today. The Apple rumor mill promised an iPhone 5 with killer specs, a huge screen and nothing less than a built-in teleportation device.
</p>
<div class="reported_by">
Reported by
<div class="chart_container model_history_container abbreviated">
<table>
<tbody>
<tr>
<td class="model before_current" data-id="15548686" data-months="11 months">
<div class="model_content">
<div class="chatbox">
<div class="box_content">
<div class="product_image_container">
<div class="product_image">
{
correctedQuery: "nintendo",
corrections: [
{
left: "nentendo",
right: 1.7976931348623157e+308,
value: 1.7976931348623157e+308,
key: "nentendo"
}
],
@devth
devth / .zshrc
Created January 23, 2012 23:29
Useful when experimenting with git features in a test repo.
# create <n> dummy timestamp commits for git testing
# usage: gcn <n>
function gcn() {
for (( i=1; i<= $1; i++ ))
do
echo `date` >> timestamp
git add -A
git commit -m "`date`"
done
}
@devth
devth / .zshrc
Last active September 30, 2015 03:18
# generate commit-n - dummy timestamp commits for git testing
function gcn() {
for (( i=1; i<= $1; i++ ))
do
let rand=$RANDOM
echo `date` "--" $rand >> timestamp
git add -A
git commit -m "Generate a commit at `date` with $rand"
sleep .3 # Sleep in order to add some variance to date command
done
@devth
devth / .gitconfig
Last active September 30, 2015 03:18
[alias]
st = status -sb
ci = commit
co = checkout
br = branch
sb = show-branch
dt = difftool
pu = push
cia = commit -a --amend