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
| " folding for Markdown headers, both styles (atx- and setext-) | |
| " http://daringfireball.net/projects/markdown/syntax#header | |
| " | |
| " this code can be placed in file | |
| " $HOME/.vim/after/ftplugin/markdown.vim | |
| " In Markdown, setext-style overrides atx-style, so we first check for an | |
| " underline. Empty lines should be ignored when underlined. | |
| func! Foldexpr_markdown(lnum) | |
| let l1 = getline(a:lnum) |
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
| (ns distblast-cluster.vagrant | |
| (:require [pallet.compute :as compute] | |
| [pallet.phase :as phase] | |
| [pallet.core :as core] | |
| [pallet.utils :as utils] | |
| [pallet.compute.node-list :as node-list] | |
| [pallet.action.exec-script :as exec-script])) | |
| (defn test-script [session] | |
| (-> session |
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
| " tmux will only forward escape sequences to the terminal if surrounded by a DCS sequence | |
| " http://sourceforge.net/mailarchive/forum.php?thread_name=AANLkTinkbdoZ8eNR1X2UobLTeww1jFrvfJxTMfKSq-L%2B%40mail.gmail.com&forum_name=tmux-users | |
| if exists('$TMUX') | |
| let &t_SI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=1\x7\<Esc>\\" | |
| let &t_EI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=0\x7\<Esc>\\" | |
| else | |
| let &t_SI = "\<Esc>]50;CursorShape=1\x7" | |
| let &t_EI = "\<Esc>]50;CursorShape=0\x7" | |
| endif |
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 curry(f) { | |
| return function(x) { | |
| var g = f.bind(this, x); | |
| if(g.length == 0) return g(); | |
| if(arguments.length > 1) return curry(g).apply(this, [].slice.call(arguments, 1)); | |
| return curry(g); | |
| }; | |
| } | |
| var sum = curry(function(x, y) { |
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
| #_( | |
| Let's say you have a threadpool doing work that requires access to some shared resource. | |
| And this resource needs to be refreshed at times. E.g. an OAuth bearer token that can expire or be revoked. | |
| If this resource were expensive to refresh, or subject to rate limiting (OAuth tokens are often both) | |
| then it's desirable to refresh as little as possible. | |
| It's undesirable, however, to mix complicated synchronization code for updating the resource in | |
| with the business logic consuming it. | |
| Enter the lock less monster, a lock free method for coordinating updates to a shared reference. |
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
| form.inputbox | |
| input(type=text required) | |
| button.del(type="reset") |
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
| # Config for GNU GRand Unified Bootloader (GRUB) (2) | |
| # /boot/grub/grub.cfg | |
| # or | |
| # /boot/grub2/grub.cfg | |
| # This grub.cfg file was created by Lance http://www.pendrivelinux.com | |
| # Suggested Entries and the suggestor, if available, will also be noted. | |
| # and then improved by Pysis. |