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/perl | |
| use strict; | |
| use warnings; | |
| use Net::FTP; | |
| use Data::Dump::Color; | |
| get_opts(); | |
| my $src = parse_ref_spec($ARGV[0]); | |
| my $dest = parse_ref_spec($ARGV[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
| #!/usr/bin/perl | |
| use strict; | |
| use warnings; | |
| use Term::Size; | |
| my ($max_chars) = Term::Size::chars(\*STDOUT); | |
| my $delimiter = qr/\n/; | |
| my $rows_first = 0; | |
| my $columns; | |
| my @args; |
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
| PS1='\u@\h \w \$ ' | |
| reduce-path() { | |
| local path=${1-$PWD} target=${2-33} IFS=/ | |
| [[ "$path" =~ ^$HOME(/|$) ]] && path="~${path#$HOME}" | |
| [[ ${#path} -le $target ]] && echo "$path" && return | |
| local order=$((i=0; for e in $path; do echo ${#e} $i; ((i++)); done) | | |
| head -n-1 | sort -rn | cut -d " " -f 2) | |
| local elements=($path) | |
| IFS=$'\n' | |
| for i in $order; do |
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 | |
| # bash script that prints out ansi codes for different colors | |
| function name { | |
| local bold=$1 color=$2 | |
| test -z $bold || echo -ne "bold " | |
| case $color in | |
| 30) echo black ;; | |
| 31) echo red ;; | |
| 32) echo green ;; | |
| 33) echo yellow ;; |
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/perl | |
| use strict; | |
| use warnings; | |
| my $script = "#include <stdio.h>\n"; | |
| my $main = ""; | |
| my @args = @ARGV; | |
| @ARGV = (); | |
| while ($_ = shift @args) { |
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/perl | |
| use Term::ANSIColor; | |
| my $make_color = 'cyan'; | |
| my $cmd_color = 'cyan'; | |
| my $trace_color = 'green'; | |
| my $file_color = 'bold green'; | |
| my $line_color = 'bold yellow'; | |
| my $warning_color = 'bold red'; |
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/perl | |
| use Data::Dumper; | |
| use Term::ANSIColor; | |
| # plays lost files in order | |
| # | |
| # B jacob and smokey | |
| # black rock | |
| # | |