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
from __future__ import print_function | |
import sys | |
# Some color codes for terminals. | |
# You just print the text and color codes, and print rst to | |
# send the color reset sequence. | |
# The color sequence names are in the first bit of code below. | |
# Usually, just use with something like: |
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/perl | |
use warnings; | |
use 5.24.0; | |
use Text::Table; | |
use Getopt::Lucid qw( :all ); | |
# Colours! | |
my $a_match="\033[33;1m"; | |
my $a_close="\033[36;1m"; | |
my $a_rst="\033[;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
#!/usr/bin/perl | |
use 5.24.0; | |
use Text::Table; | |
my $data = <<'EOT'; | |
1/16 1.5875 | |
1/8 3.1750 | |
3/16 4.7625 | |
1/4 6.3500 | |
5/16 7.9375 | |
3/8 9.5250 |
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/perl | |
# Change to a directory seen in the current tmux pane. | |
# | |
# Free for everyone for everything good, according to the author, | |
# jaggz.h {who is at} gmail.com. 2022-04-30 | |
# | |
# https://gist.github.com/dcfdabf1f3c5576a476c283379df04c4 | |
# Screenshot: https://i.imgur.com/22iV7j7.png | |
# | |
# 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
amazonChoice bestSeller position.global_position title asin price.savings_amount reviews.rating price.discounted position.position price.currency price.current_price position.page thumbnail sponsored score amazonPrime url reviews.total_reviews price.savings_percent price.before_price | |
4 [ 1] [0m 0.00 0 [30;1m 1ct[0m [33;1mWalfront AS5048A Magnetic Encoder, PWM SPI Interface 14 Bit Fit for Brushless Motor | |
[30;1mB08LDFJ7F4 https://www.amazon.com/dp/B08LDFJ7F4[0m | |
4 [ 2] [0m 0.00 0 [30;1m 7ct[0m [33;1muxcell 7 Pcs D Shaft 20 Points 360 Degree Rotary Encoder Switch, 6 mm | |
[30;1mB0197X1UZY https://www.amazon.com/dp/B0197X1UZY[0m | |
4 [ 3] [0m 0.00 0 [30;1m 1ct[0m [33;1mRotary Encoder Aluminum Alloy Spring Bracket Holder 20mm Hole for GHS38 | |
[30;1mB08C2HHY6W https://www.amazon.com/dp/B08C2HHY6W[0m | |
4 [ 4] [0m 0.00 0 [30;1m 1ct[0m [33;1mDynapar 22 |
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
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |
<style type="text/css"> | |
.ef0,.f0 { color: #000000; } .eb0,.b0 { background-color: #000000; } | |
.ef1,.f1 { color: #AA0000; } .eb1,.b1 { background-color: #AA0000; } | |
.ef2,.f2 { color: #00AA00; } .eb2,.b2 { background-color: #00AA00; } | |
.ef3,.f3 { color: #AA5500; } .eb3,.b3 { background-color: #AA5500; } | |
.ef4,.f4 { color: #0000AA; } .eb4,.b4 { background-color: #0000AA; } | |
.ef5,.f5 { color: #AA00AA; } .eb5,.b5 { background-color: #AA00AA; } |
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
position.position asin position.page thumbnail amazonChoice price.savings_amount title price.currency bestSeller score price.savings_percent sponsored price.before_price reviews.rating price.current_price position.global_position price.discounted reviews.total_reviews url amazonPrime | |
4 [ 1] [0m 0.04 16.99 [30;1m480ct[0m [33;1mBOJACK 37 Values 480 Pcs Electronics Component Fun Kit with Power Supply Module, Jumper Wire,Precision Potentiometer,830 t... [30;1mB099MQV8ZW https://www.amazon.com/dp/B099MQV8ZW[0m | |
4 [ 2] [0m 0.04 12.79 [30;1m300ct[0m [33;1mHilitchi 15 Value 300pcs Variable Resistor Assorted Kit [30;1mB01CV9P23C https://www.amazon.com/dp/B01CV9P23C[0m | |
4 [ 3] [0m 0.06 16.99 [30;1m300ct[0m [33;1mRaogoodcx Variable Resistor Assorted Kit 15 Value 300pcs Potentiometer Kit [30;1mB07ZX2CB6B https://www.amazon.com/dp/B07ZX2CB6B[0m | |
4 [ 4] [0m 0.06 17.99 [30;1m300ct[0m [33;1mSponsored Ad - BOJACK 15 Values 300 pcs 100 Ohm- 2M Ohm Variable Resistor 6mm Pot |
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/perl | |
# Outputs a 24-bit color (r,g,b) table of resistor information | |
# (Requires a terminal supporting 24 bit colors) | |
# https://gist.github.com/7928e4f3797b421a68fbffd780018727 | |
# jaggz.h over at gmail | |
use Text::Table; | |
use utf8; | |
my $tb = Text::Table->new(qw/Color Digit Multiplier Tolerance/); | |
$tb->load( |
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
package bansi; | |
# Gist url: https://gist.github.com/7b22252263719757e17ca710ac091110 | |
use strict; use warnings; | |
use Exporter 'import'; | |
our @codes = qw( | |
$bgbla $bgred $bggre $bgbro | |
$bgblu $bgmag $bgcya $bggra | |
$bla $red $gre $bro |
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/perl | |
# gist url: https://gist.github.com/jaggzh/f004a9917c2cb50ec2e10d24ed925dcd | |
# Processes CSV output from an amazon-buddy command | |
# About: | |
# Originally I wrote this for cost/pill for supplements. | |
# In its present state it's modified for finding syringes, | |
# evaluating with the regexes for "2 pack" "5ct" etc. |