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
| #!/usr/bin/ruby | |
| require 'set' | |
| require 'csv' | |
| ARGV.count > 2 or raise "Usage: compare_csv <key>:<filename> <key>:<filename> <col:col> ..." | |
| k1, f1 = ARGV[0].split(':') | |
| k2, f2 = ARGV[1].split(':') | |
| cols = ARGV[2..].map { |c| c.split(':') } |
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
| """""""""""""""""""""""" | |
| " Plugins " | |
| """""""""""""""""""""""" | |
| " Plugs | |
| set nocompatible "not vi compatible | |
| call plug#begin('~/.local/share/nvim/plugged') | |
| " Visual | |
| Plug 'junegunn/seoul256.vim' " Color Schema | |
| Plug 'itchyny/lightline.vim' " Status line (alternate to powerline). Requires: laststatus=2 |
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
| #!/usr/bin/env ruby | |
| # frozen_string_literal: true | |
| require "colorize" | |
| require "open3" | |
| require "optparse" | |
| USAGE = "k8-set -n NAMESPACE -p POD -c CONTAINER" | |
| CONFIGS = [:namespace, :pod, :container].freeze |
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
| #!/usr/bin/env ruby | |
| # frozen_string_literal: true | |
| require "colorize" | |
| require "open3" | |
| require "optparse" | |
| require "concurrent" | |
| MAX_ACTIVE_THREADS = 5 | |
| THREAD_TIMEOUT = 5 |
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
| #!/bin/bash | |
| if [ -z "$1" ]; then | |
| echo "must provide jq query" | |
| elif [ -p /dev/stdin ]; then | |
| eval "cat | grep --line-buffered '^{' | jq $1" | |
| else | |
| echo "missing input" | |
| exit 1 | |
| fi |
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
| #!/usr/bin/env ruby | |
| require 'open3' | |
| USAGE = "dsync source container_id:target [base_commit]" | |
| unless [2, 3].include?(ARGV.size) | |
| puts USAGE | |
| exit 1 | |
| end |
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
| #!/usr/bin/env ruby | |
| require 'yaml' | |
| VERBS = %w(pick, usage).freeze | |
| NEGATE_CHAR = '~' | |
| POOLS = YAML.load_file("/Users/vdinovi/bin/victims_pool.yml") | |
| USAGE = <<~USAGE | |
| Picks a random victim from the intersection pools for horrific task like Code Review | |
| Usage: victim <verb> <pool1>:<pool2>:!<pool3>... |
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
| #!/usr/bin/env ruby | |
| require 'csv' | |
| require 'terminal-table' | |
| require 'optparse' | |
| require 'pry' | |
| ARGV[0] or raise "input csv required" | |
| ARGV[1] or raise "target branch name required" |
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
| #!/usr/bin/env ruby | |
| require 'terminal-table' | |
| FORMAT = /([\w\:]+)\#(test_[\w]*)[\s\:]*(.*)\s*=\s*(\d+\.\d+)\s*.*=\s*(.*)\s*/ | |
| IGNORE = [ | |
| /\{\"message\".*\n?\}/, | |
| /Run\soptions\:/, | |
| /\#\sRunning\:/, | |
| /\*\sDEFERRED/, |
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
| #!/usr/bin/ruby | |
| # stupid version of hexdump to just read the first n bytes from stdin | |
| # no args supported | |
| # useful for when hexdump is not available | |
| # | |
| # to print out the first two bytes from a file | |
| # ./ruby_hexdump 2 < some_file | |
| ARGV.count == 1 or raise "Usage: ruby_hexdump <num bytes>" |
NewerOlder