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 bash | |
METANYAN="$(cat <<'EOT' | |
H4sIAHQtVlECA+2dS5rjJhCA93OK7CY5RBa5QPZZFu1uu2UQ99/FFCDQCwEq2bRVfI5bZMb/1AOw | |
VF0U//73z79///lbZDeV+LPfv/7A9ruApihxxNIlG+Nqm2oaR6msUi1LdypXMK5VnCLFKRLeUdI9 | |
zxUwbXm4D9f8n7ku3KcNtnEfa83QZNxSvCycxdzwhbws3KdrHmR7cPeYIN827nOtQaQqAKIfuBV/ | |
FOGg68BKZ662cF+uDaBH+/qCYLoHBHl3vEjivubNiABfY+nM/wL7sxiHPMTdAs63TdzFNY+7WJ6X | |
7jaiLfMG3GWpIe/ux4nBKctUUIO7AATprCfwrYMM3LdrnoUdj0PH9v2gat8ncd9rzUwy74kHzohl | |
Xjtw95G2YIdK2rOPD15dUw6EHWO8sDJtjJOAuy63SKCcJTQD9/jooBterGk6wflnGqPv1fWtIEEa | |
132fmwr1o75nGcc4Ypxi2zHuCJxqGGdCJeosyhZ4Vmc0he8i8TcKcEqZ14MmSHDE0nmcpsJpxgWb |
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
Latency Comparison Numbers | |
-------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns | |
Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms | |
Read 4K randomly from SSD* 150,000 ns 0.15 ms |
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 'curses' | |
Curses.init_screen | |
Curses.start_color | |
Curses.use_default_colors if Curses.respond_to? :use_default_colors | |
Curses.raw | |
Curses.noecho | |
Curses.addstr 'Hello world' | |
Curses.refresh |
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
(defn recreate-table! | |
[] | |
(doto C | |
(admin/drop-table! :test-table) | |
(admin/create-table :test-table :d))) | |
(defn increment | |
[max] | |
(core/with-table C [t :test-table] | |
(core/inc t (rand-int max) {:d:foo 1}))) |
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
function! s:with_git_root() | |
let root = systemlist('git rev-parse --show-toplevel')[0] | |
return v:shell_error ? {} : {'dir': root} | |
endfunction | |
command! -nargs=* Rag | |
\ call fzf#vim#ag(<q-args>, extend(s:with_git_root(), g:fzf#vim#default_layout)) |
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/src/options.go b/src/options.go | |
index 962e516..6519d08 100644 | |
--- a/src/options.go | |
+++ b/src/options.go | |
@@ -91,42 +91,43 @@ func defaultMargin() [4]string { | |
// Options stores the values of command-line options | |
type Options struct { | |
- Fuzzy bool | |
- Extended bool |
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
echom 'xxx' |
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/autoload/vader/parser.vim b/autoload/vader/parser.vim | |
index dbf5da0..da7c7b8 100644 | |
--- a/autoload/vader/parser.vim | |
+++ b/autoload/vader/parser.vim | |
@@ -58,6 +58,9 @@ function! s:flush_buffer(cases, case, fn, lnum, raw, label, newlabel, buffer, fi | |
if a:final || | |
\ a:newlabel == 'given' || | |
\ index(['before', 'after', 'do', 'execute'], a:newlabel) >= 0 && fulfilled | |
+ if !empty(a:case.file) | |
+ let a:case.given = remove(a:case, 'file') |
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/README.md b/README.md | |
index a36a60a..65804e6 100644 | |
--- a/README.md | |
+++ b/README.md | |
@@ -122,6 +122,12 @@ let g:fzf_colors = | |
\ 'marker': ['fg', 'Keyword'], | |
\ 'spinner': ['fg', 'Label'], | |
\ 'header': ['fg', 'Comment'] } | |
+ | |
+" Enable per-command history. |
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
package main | |
import ( | |
"fmt" | |
"os" | |
"syscall" | |
) | |
func GetBytes() []byte { | |
_in, _ := os.OpenFile("/dev/tty", syscall.O_RDONLY, 0) |