Skip to content

Instantly share code, notes, and snippets.

View tomku's full-sized avatar

Tom Kurth tomku

  • Northeast Wisconsin, USA
View GitHub Profile
### Keybase proof
I hereby claim:
* I am tomku on github.
* I am tomku (https://keybase.io/tomku) on keybase.
* I have a public key ASANq_pECjSl9KvBvxbaf3Ilr5tiGhLcoB4kMe487bg1jQo
To claim this, I am signing this object:
urls = ["http://www.google.com", "http://www.bing.com", "http://www.yahoo.com"]
for_tasks = for {url, i} <- Enum.with_index(urls) do
Task.async(fn ->
:timer.sleep(3000 * i)
IO.puts("for ##{i}: #{url}")
end)
end
map_tasks = urls
@tomku
tomku / omz-git-hub.patch
Created June 17, 2012 20:31
Patch for oh-my-zsh to make sure to use real git instead of Ruby-powered hub alias
diff --git a/lib/git.zsh b/lib/git.zsh
index fb4ad8c..66e4541 100644
--- a/lib/git.zsh
+++ b/lib/git.zsh
@@ -1,6 +1,6 @@
# get the name of the branch we are on
function git_prompt_info() {
- ref=$(git symbolic-ref HEAD 2> /dev/null) || return
+ ref=$(command git symbolic-ref HEAD 2> /dev/null) || return
echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_SUFFIX"
(defun fix-octave-comments ()
(make-local-variable 'comment-start)
(set 'comment-start "%")
(set 'comment-column 0))
(add-hook 'octave-mode-hook 'fix-octave-comments)