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/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 |
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
// 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*$/, |
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
pngcrush -rem allb -brute -reduce file.png /dev/stdout | openssl base64 | tr -d '\n' | pbcopy |
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
[{ | |
"icao": "EVY", | |
"carrier": "34 Squadron, Royal Australian Air Force", | |
"country": "Australia" | |
}, { | |
"icao": "RNX", | |
"carrier": "1Time Airline", | |
"country": "South Africa" | |
}, { | |
"icao": "TTF", |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# `gem install win32-window` first | |
require 'win32/window' | |
puts "Searching for Notepad window..." | |
window = nil | |
loop do | |
window = Window.find(title: /Notepad/) | |
break unless window.empty? |
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
Find: gem '(.*?)'(.*)\n? | |
Replace: \1\n |
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
Find: ^(.+) \(newest ([A-Za-z0-9\s\.]+), installed ([0-9\.]+).*\n | |
Replace: \1,\2,\3\n | |
This will take the output of `bundle outdated` and create a comma-delimited list in this format: | |
`gem_name,bundle_version,newest_version` |
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
# encoding: utf-8 | |
puts 'What should I name the model?' | |
model_name = gets | |
puts 'Enter model schema:' | |
sch = gets.match(/\((.*)\)/)[1] | |
puts 'Analyzing schema string...' | |
scaffold_string = 'rails g scaffold {replace_me}' |
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
NOTES | |
- The immediate threat seems to be PIPA in the senate, and since we're constituents of the most influential man in the senate, we'll start with Reid. | |
- What about Dean Heller? | |
- SOPA is just as bad. We have to talk to Shelley Berkley too. | |
- Amending the bill to take out the DNS blocking provisions isn't good enough. |
NewerOlder