Skip to content

Instantly share code, notes, and snippets.

View tspangler's full-sized avatar
💵
if i'm goin down then i'm goin down rich

Timothy tspangler

💵
if i'm goin down then i'm goin down rich
View GitHub Profile
@tspangler
tspangler / crush.sh
Last active October 25, 2019 15:13
max pngcrush + base64 + strip newlines + copy to clipboard
pngcrush -rem allb -brute -reduce file.png /dev/stdout | openssl base64 | tr -d '\n' | pbcopy
@tspangler
tspangler / validation.js
Created October 25, 2019 15:11
Various validation regexes
// Assorted validation regexes from Nicor's rebate system
{
USERNAME_REGEX : /^[a-zA-Z0-9_\-]{0,1000}$/,
PASSWORD_REGEX : /^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[^a-zA-Z0-9])[A-Za-z0-9~`!@#$%^&*()_+={}\-]{8,50}$/,
MTN_REGEX : /^\d{10}$/,
TRACKING_NO_REGEX : /^\d{5,13}$/,
ZIPCODE5_REGEX : /^\d{5}$/,
ACCOUNT_REGEX : /^\d{10}$/,
ACCOUNT_REGEX_20: /^\d{0,20}$/,
NUMBER_REGEX : /^\d*$/,
@tspangler
tspangler / dl-hashes.rb
Created May 30, 2021 14:46
Download all hashes from virusshare.com
#!/usr/bin/env ruby
BASE_URL = "https://virusshare.com/hashfiles/VirusShare_00!.md5"
0..389.each do |num|
puts "Downloading #{num}..."
`wget #{BASE_URL.gsub('!', num)}`
end