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
| $ echo "1,2,3\n4,5,6" | jq -R 'split(",")' | |
| # result | |
| [ | |
| "1", | |
| "2", | |
| "3" | |
| ] | |
| [ | |
| "4", | |
| "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
| (define $binet | |
| (lambda [$n] | |
| (* (/ 1 (sqrt 5)) | |
| (- (/ (+ 1 (sqrt 5)) 2)^n | |
| (/ (- 1 (sqrt 5)) 2)^n)))) | |
| ; > (binet 3) | |
| ; 2 | |
| ; > (binet 1) | |
| ; 1 |
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 | |
| # ****MOVE TO*** https://github.com/greymd/tmssh | |
| # ssh-multi | |
| # yasuhiro.yamada | |
| # Based on http://linuxpixies.blogspot.jp/2011/06/tmux-copy-mode-and-how-to-control.html | |
| # and https://gist.github.com/dmytro/3984680 | |
| # a script to ssh multiple servers over multiple tmux panes |
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
| # How to encrypt | |
| $ banner yes | sed 'y/# /10/' | awk NF | perl -nle 'print $_."0"x9' | grep -oE '^.{24}' | tr -d '\n' | perl -nle 'printf pack("B*",$_)' | base64 | |
| # How to decrypt | |
| $ echo 'In48FEBACHw8CEACCEBCCH48' | base64 -d | xxd -b -c 3 | awk '$1="";$NF="";1' | sed 'y/01/ y/' | |
| y y yyyyyy yyyy | |
| y y y y | |
| y yyyyy yyyy | |
| y y y | |
| y y y 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
| echo-sd そんなバナナ! ;echo " __ \n \/.--, \n //_.' \n .-""-/""-. \n / __ \\ \n / \\\\\\ \\ \n | || | \n \ / \n \ \ / \n \ '- / \n '-.__.__.' \n"; toilet みかん | |
| _人人人人人人人人人_ | |
| > そんなバナナ! < | |
|  ̄Y^Y^Y^Y^Y^Y^Y^Y^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
| echo-sd そんなバナナ! ;echo " __ \n \/.--, \n //_.' \n .-""-/""-. \n / __ \\ \n / \\\\\\ \\ \n | || | \n \ / \n \ \ / \n \ '- / \n '-.__.__.' \n"; toilet みかん | |
| _人人人人人人人人人_ | |
| > そんなバナナ! < | |
|  ̄Y^Y^Y^Y^Y^Y^Y^Y^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
| #! /usr/local/bin/bash | |
| # Cloned from https://gist.github.com/greymd/aeb99a85a95dd448432490212024bb7f | |
| # | |
| # Calomel.org | |
| # https://calomel.org/zfs_health_check_script.html | |
| # FreeBSD 9.1 ZFS Health Check script | |
| # zfs_health.sh @ Version 0.15 |
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
| gseq $(gdate -d '2016-12-16' +%s) 46400 $(gdate -d '2016-12-30' +%s) | awk '{ print $1+int(rand()*46400)}' | xargs -I@ date -r @ '+[%d/%b/%Y %H:%m:%S]' | sort |
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
| adjust_md_refs () { | |
| local _tmp_file="/tmp/$$.adjust_md_refs" | |
| cat "$1" | grep -oP '\[\^[^\[]*?\](?!:)' | while read s; do echo "$s" | awk '{print "s/"$1"/[^'$(cat /dev/urandom| LANG=C tr -dc 'A-Za-z0-9' | fold -w 10 | head -n 1)']/g"}' ;done | perl -pe 's/[\[\]]/\\$&/g' | sed -f - "$1" > "$_tmp_file" | |
| cat "$_tmp_file" | grep -oP '\[\^[^\[]*?\](?!:)' | awk '{print "s/"$1"/[^"NR"]/g"}' | perl -pe 's/[\[\]]/\\$&/g' | sed -f - "$_tmp_file" | |
| rm "$_tmp_file" | |
| } |
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
| find /home/ -type f -size -300 2> /dev/null -print0 | xargs -0 -I@ egrep -l "/proc/(self|%d)/(mem|maps)" @ | awk '{print "echo \"Contains DirtyCow string: "$0" MOD_DATE: \"$(stat -c %y \""$0"\")"}' | sh |