$ alias tbana={install_path}/tbana.sh
$ tbana- tab : toggle source (hosts/predefined queries)
| " Tab to cycle through instances of partially complete search pattern {{{ | |
| set wildcharm=<Tab> | |
| cnoremap <expr> <Tab> BetterIncSearch('tab') | |
| cnoremap <expr> <S-Tab> BetterIncSearch('stab') | |
| " better incremental search | |
| function! BetterIncSearch(key) abort | |
| if getcmdtype() ==# '/' || getcmdtype() ==# '?' | |
| if (a:key ==# 'tab' && v:searchforward) || (a:key ==# 'stab' && !v:searchforward) | |
| return "\<CR>/\<C-r>/" |
| " Parse current buffer :syntax for hl names that link to hl-groups | |
| function! activewin#syntax#Parse() | |
| redir => l:buf_syntax | |
| silent exec 'syntax' | |
| redir END | |
| let l:group_keys = [] | |
| let l:hl_pattern = '^\w\+\(\_.*links to\)\@=' | |
| call substitute(l:buf_syntax, l:hl_pattern, '\=add(l:group_keys, submatch(0))', 'g') | |
| echom string(l:group_keys) |
| #!/usr/bin/env bash | |
| # Senghan Bright | |
| # Delta Projects | |
| REPO_ROOT=$HOME/repos/chef-repo | |
| COOKBOOK_DIRECTORIES=(cookbooks community_cookbooks forked_cookbooks) | |
| COLOR_COOKBOOK=(131 165 151) | |
| COLOR_DELIMITER=(215 153 32) |
| pico-8 cartridge // http://www.pico-8.com | |
| version 4 | |
| __lua__ | |
| pallete = {1, 13, 12, 6, 7} | |
| ellipse_rad_x = 30 | |
| ellipse_rad_y = 10 | |
| velocity = 0 | |
| gravity = 0.98 | |
| posy = 1 |
| #!/usr/bin/env bash | |
| SHINKEN_HOST='http://shinken01.se-ix.delta.prod:50000' | |
| OUTPUT_FILE='./output.html' | |
| CURL_TIMEOUT=1 | |
| declare -a COLUMN_KEYS | |
| COLUMN_KEYS=( | |
| host_name | |
| description |
| #!/usr/bin/env luajit | |
| local TOTAL_COLORS = 256 | |
| local char = string.char | |
| local io_read = io.read | |
| local byte = string.byte | |
| local INDEX_MAX_DIGITS = #(tostring(TOTAL_COLORS)) + 1 | |
| -- Ascii decimal value lookup | |
| local ascii = { |
| -- OSC 4 Color Parser for Neovim | |
| -- Copyright Senghan Bright 2021 | |
| local uv = vim.loop | |
| -- check if COLORTERM is advertised by the terminal emulator | |
| local colorterm = os.getenv("COLORTERM") | |
| if not (colorterm == "truecolor") then | |
| error("Truecolor environment not found. Ensure your terminal enables the 'COLORTERM' environment variable.") | |
| end |
| local api = vim.api | |
| local fn = vim.fn | |
| local ddc = { | |
| enable = fn["ddc#enable"], | |
| patch_global = fn["ddc#custom#patch_global"], | |
| patch_filetype = fn["ddc#custom#patch_filetype"], | |
| manual_complete = fn["ddc#map#manual_complete"], | |
| get_complete_info = fn["ddc#complete_info"], | |
| } |
| local U = require "Comment.utils" | |
| local VISUAL_LINE = U.cmotion["V"] | |
| local min, max = math.min, math.max | |
| require("Comment").setup { | |
| opleader = { | |
| -- line = "gc", -- TODO: had to switch these to achieve the lua behaviour wanted | |
| line = "gb", | |
| -- block = "gb", | |
| block = "gc", |