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 | |
# silly base64decode(rot13()) | |
require 'base64' | |
string = "VW5jY2wgT3ZlZ3VxbmwgTnkh" | |
plain = Base64.decode64(string).to_s.tr 'A-Za-z','N-ZA-Mn-za-m' | |
puts plain |
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
~$ azure vm list | |
info: Executing command vm list | |
data: DNS Name VM Name Status | |
data: -------------------------------- ----------- --------- | |
data: my-vm-name.cloudapp-preview.net my-vm0 ReadyRole | |
data: my-vm-name.cloudapp-preview.net my-vm1 ReadyRole | |
data: my-vm-name.cloudapp-preview.net my-vm2 ReadyRole | |
data: my-vm-name.cloudapp-preview.net my-vm3 NotReady | |
data: my-vm-name.cloudapp-preview.net my-vm4 ReadyRole | |
data: my-vm-name.cloudapp-preview.net my-vm5 ReadyRole |
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 | |
require 'time' | |
$output = File.open("tstamp.csv",'w') | |
$input = File.open("dork.in",'r') | |
def gimmetime(str) | |
d1 = Time.parse(str) | |
rm1 = Random.new |
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
# script to watch production code commit log and send a diff of if any changes for PCI regulation needs | |
require 'rss' | |
require 'openssl' | |
DEBUG = false | |
# set the local store for marshalled data | |
$prod_code_last_reported_date = '/home/someuser/bin/watch_rss/data/last_reported.yml' |
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 | |
# | |
# quick poc to print out the mario half pyramid | |
# | |
# | |
def pymid(base) | |
1.upto(base) do |row| | |
str = "#" * row |
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 | |
require 'rubygems' | |
require 'geoip' | |
# install rubygems and geoip gem | |
# grab geoip db before | |
# | |
# wget -N -q http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz | |
# gunzip GeoLiteCity.dat.gz in same folder as this script |
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
aptitude install suricata | |
... | |
sudo modprobe nfnetlink_queue | |
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 | |
# cleaned up a bit, makes use of memoize to better handle queries to the EC2 backend, less calls == faster. | |
require 'rubygems' | |
require 'aws-sdk' | |
regions = [ | |
"ec2.us-east-1.amazonaws.com", |
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
require 'json' | |
require 'rest-client' | |
=begin | |
{"data"=> | |
{"district"=>"4fd43cc56d11340000000005", | |
"school"=>"4fee004cca2e43cf27000002", | |
"name"=>"Advanced Literature 1(B)", | |
"teacher"=>"4fee004dca2e43cf270007e8", |
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
# act like GNU screen | |
unbind C-b | |
set -g prefix C-a | |
# look good | |
set -g default-terminal "screen-256color" | |
# Allows for faster key repetition | |
set -s escape-time 0 |
OlderNewer