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 ruby | |
# | |
# pong.rb v0.1.3 - Monitor network addresses. | |
# Made with ❤︎ by [email protected] | |
module Scripter extend self | |
def clean_exit(message = nil) | |
Signal.trap("INT") { |signo| Scripter.tput('clear'); puts; puts message if message; exit 0 } | |
end |
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 ruby | |
# | |
# vtplayer.rb - A simple script to play vt100 animations. | |
# Made with ❤︎ by [email protected] - v0.1 | |
# | |
# Some places to find vt100 animations: | |
# http://artscene.textfiles.com/vt100/ | |
# http://www.scovetta.com/archives/textfiles/art | |
require 'open-uri' |
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 ruby | |
# | |
# auto-ssh.rb - Setup SSH login without a password. | |
# Made with ❤︎ by [email protected] | |
## Gem Installer | |
def require_gems(*gems) | |
gems.each do |_gem| | |
begin require _gem | |
rescue LoadError |
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 ruby | |
# | |
# grsp.rb - Get remote OS X system profile. Version 0.1 | |
# Made with ❤︎ by [email protected] | |
require 'optparse' | |
require 'io/console' | |
require 'net/ssh' | |
Signal.trap("INT") { puts; exit 0 } |
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 ruby | |
require 'etc' | |
def as_user(user = Etc.getlogin, &block) | |
u = (user.is_a? Integer) ? Etc.getpwuid(user) : Etc.getpwnam(user) | |
puts "Running child process as the user #{user}(#{u.uid})." | |
pid = Process.fork do | |
Process.uid = u.uid | |
block.call(user) | |
end |
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 ruby | |
require 'uri' | |
pb = ( (/darwin/ =~ RUBY_PLATFORM) != nil ? true : false ) | |
## Get Options | |
if ARGV[0] == "-h" | |
puts "#{$0} -e [STRING] (Encode String)" | |
puts "#{$0} -d [STRING] (Decode String)" | |
exit 0 | |
end |
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
#!/bin/bash | |
[[ $(uname) != "Darwin" ]] && echo "OS X Only" && exit 1 | |
sudo -v | |
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom \ | |
| while read i; do | |
sudo rm /usr/local/${i} | |
done |
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 ruby | |
# | |
# raffle.rb - Raffle off items with ruby. Version 0.2 | |
# Made with ❤︎ by [email protected] | |
# | |
# To use cd into a directory with a 'tickets.txt' | |
# file and a 'items.txt' file. Then just run the | |
# script. Items in the files should be separated | |
# by new lines. |
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 bash | |
# | |
# mac_vendor.sh - Get the vendor for a mac address from the terminal. | |
# Made with ❤︎ by [email protected] | |
# Set Functions | |
usage() | |
{ | |
echo "MAC Vendor Help" | |
echo "mac_vendor -a 'MAC Address' | Get the vendor of the specified address." |
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 bash | |
# [email protected] | |
# host_down.sh | |
[[ $1 == "-a" ]] && audible='\a' && shift || audible= | |
address_1=$1 | |
address_2=$2 | |
[[ -z $address_1 ]] && read -p "Address #1 to ping: " address_1 | |
[[ -z $address_2 ]] && read -p "Address #2 to ping: " address_2 |
NewerOlder