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 perl | |
use strict; | |
use warnings; | |
# get a command name, or bail out if the user didn't supply one | |
my $name = $ARGV[0] or die "must supply a command name"; | |
# get the 'which' output for the user-supplied command name | |
chomp( my $which_output = `which $name` ); |
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; | |
# github.com/dbbolton | |
# | |
# simple "truth table" evaluator | |
for my $i (0..1) { | |
for my $j (0..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
urxvt.perl-ext-common: default,tabbed,matcher,searchable-scrollback | |
urxvt*cutchars: "()*,<>[]{}|' | |
urxvt*termName: rxvt-unicode | |
urxvt*urlLauncher: iceweasel | |
urxvt*matcher.button: 1 | |
urxvt*keysym.S-Prior: ^[[5;2~ | |
urxvt*keysym.S-Next: ^[[6;2~ | |
urxvt*geometry: 100x30 | |
urxvt*highlightSelection: true |
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
Usage: carta [SYMBOL] [OPTIONS] | |
Symbol is required and case-insensitve; | |
Configuration: | |
You can set default options, the image viewing application, and down- | |
loading application in the top lines of the script file itself. The | |
default viewer is 'feh', and the default downloader is 'curl'. | |
Basic options: |
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
if [[ -f $HOME/.perlbrew/init ]]; then | |
source $HOME/.perlbrew/init | |
fi | |
short_option="" | |
__perlbrew_reinit () { | |
echo '# DO NOT EDIT THIS FILE' > $HOME/.perlbrew/init | |
command perlbrew $short_option env $1 >> $HOME/.perlbrew/init | |
source $HOME/.perlbrew/init |
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
perl -wle 'for(0..10**7){if($_%2==0){$s+=(4/((2*$_)+1));}else{$s-=(4/(2*$_+1));}print$s}' |
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
print '0b01110010 0b01100001 0b01100100' | |
0b01110010 0b01100001 0b01100100 | |
perl -e 'print chr(0b01100001)' | |
a | |
print '0b01110010 0b01100001 0b01100100' | perl -lane 'print $_ for @F' | |
0b01110010 |
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
▒▒██▒▒▒▒▒▒██▒▒▒█▒▒██▒▒▒▒▒▒██▒▒▒▒▒▒██▒▒▒▒▒▒██▒▒▒█▒▒██▒▒▒█▒▒██▒▒▒▒ | |
▒▒██▒▒▒█▒▒██▒▒▒█▒▒██▒▒▒▒▒▒██▒▒▒█▒▒██▒▒▒█▒▒██▒▒▒█▒▒██▒▒▒▒▒▒██▒▒▒▒ | |
▒▒██▒▒▒█▒▒██▒▒▒█▒▒██▒▒▒█▒▒██▒▒▒▒▒▒██▒▒▒█▒▒██▒▒▒▒▒▒██▒▒▒█▒▒██▒▒▒▒ | |
▒▒██▒▒▒█▒▒██▒▒▒█▒▒██▒▒▒▒▒▒██▒▒▒█▒▒██▒▒▒▒▒▒██▒▒▒▒▒▒██▒▒▒█▒▒██▒▒▒█ | |
▒▒██▒▒▒▒▒▒██▒▒▒▒▒▒██▒▒▒▒▒▒██▒▒▒█▒▒██▒▒▒▒▒▒██▒▒▒█▒▒██▒▒▒█▒▒██▒▒▒█ | |
▒▒██▒▒▒█▒▒██▒▒▒█▒▒██▒▒▒█▒▒██▒▒▒█▒▒██▒▒▒█▒▒██▒▒▒█▒▒██▒▒▒█▒▒██▒▒▒▒ | |
▒▒██▒▒▒▒▒▒██▒▒▒█▒▒██▒▒▒▒▒▒██▒▒▒▒▒▒██▒▒▒▒▒▒██▒▒▒█▒▒██▒▒▒▒▒▒██▒▒▒█ | |
▒▒██▒▒▒█▒▒██▒▒▒█▒▒██▒▒▒▒▒▒██▒▒▒█▒▒██▒▒▒█▒▒██▒▒▒▒▒▒██▒▒▒▒▒▒██▒▒▒▒ | |
▒▒██▒▒▒▒▒▒██▒▒▒▒▒▒██▒▒▒▒▒▒██▒▒▒▒▒▒██▒▒▒█▒▒██▒▒▒▒▒▒██▒▒▒▒▒▒██▒▒▒█ | |
▒▒██▒▒▒▒▒▒██▒▒▒▒▒▒██▒▒▒█▒▒██▒▒▒▒▒▒██▒▒▒▒▒▒██▒▒▒▒▒▒██▒▒▒█▒▒██▒▒▒█ |
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 perl | |
use strict; | |
use warnings; | |
use 5.010; | |
open (my $in, '<', '/etc/passwd'); | |
my %passwd; | |
while (<$in>) { |
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 5.010; | |
use strict; | |
use warnings; | |
my $pattern = '<!-- placeholder -->'; | |
my $text = << "EOF"; | |
<html> | |
<head> |
OlderNewer