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
use File::Slurp ; | |
use File::Path ; | |
use PBS::Rules::Builders ; | |
use POSIX qw(strftime); | |
#------------------------------------------------------------------------------- | |
# C depender for object files (not part of the core pbs but distributed with it) |
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
use MONKEY-SEE-NO-EVAL; | |
role CustomSetup | |
{ | |
has Int $.thingy ; | |
method custom_setup | |
{ |
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
_bgc_zef () | |
{ | |
commands="install \ | |
uninstall \ | |
test \ | |
fetch \ | |
build \ | |
look \ | |
update \ | |
upgrade \ |
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
use Data::Dump::Tree ; | |
use Data::Dump::Tree::Enums ; | |
use Data::Dump::Tree::ExtraRoles ; | |
use Terminal::ANSIColor ; | |
use LWP::Simple; | |
use DOM::Tiny ; | |
my @colors = < on_240 on_241 on_244 on_245 on_254 on_230 on_136 on_166 on_160 on_125 on_61 on_33 on_37 on_64 > ; |
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
#!/bin/bash | |
# functions moved in a script so they can be used by fzf preview | |
# arg_n: echo "$2" | cut -d : -f $1 | |
# minus_limit: test $(($number - $minus)) -le $limit && echo $limit || echo $(($number - $minus)) | |
match=$( \ | |
rg --no-heading -n --color=always --colors 'match:style:nobold' --colors 'match:fg:white' $* . | \ | |
plc --values | \ | |
fzf -e -m \ |
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
#!/bin/bash | |
fd --type f -H --color=always | \ | |
rg -v '.git(\u001B\[[0-9;m]+)*/' $* | \ | |
fzf -e -m --ansi --preview 'bat --line-range 0:150 --tabs=4 -n --color=always {}' --preview-window='top:50%' --color="hl:51" |
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
#!/bin/bash | |
help_text=\ | |
"NAME | |
ir - create a temporary file structure and run a viewer | |
SYNOPSIS | |
ir | |
ir directory [directory ...] | |
non_interactive_commands_pipeline | ir |
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 | |
bind -x '"'"\C-k"'":"set_command_cursor"' | |
set_command_cursor() | |
{ | |
local BACKSPACE=$(printf "0000000 005177\n0000002") | |
local TAB=$'\x09' | |
#local SHIFT_TAB=$(printf "????0000000 005033\n0000002") # todo: | |
#local SHIFT_TAB="$(echo -e '\e[Z')" #doesn'twork |
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
# load docker completion | |
. /usr/share/bash-completion/completions/docker >/dev/null 2>&1 | |
alias d=docker | |
complete -F _docker d | |
# extract columns interactively | |
di() { _dcol 'image ls' 2 ; } | |
din() { _dcol 'image ls' 0 1 ; } | |
dc() { _dcol 'container ls' 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
use Data::TreeDumper ; | |
@a = (1, 3, 5, 6, 7, 8 ); | |
@b = ( 2, 3, 5, 7, 9); | |
# one loop | |
@union = @isect = @diff = (); | |
%union = %isect = %diff = (); | |
foreach $e (@a, @b) |