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 | |
# s3-delete-bucket.rb | |
# Fog-based script for deleting large Amazon AWS S3 buckets (~100 files/second) | |
# Forked from this excellent script: https://github.com/SFEley/s3nuke | |
require 'rubygems' | |
require 'thread' | |
require 'fog' |
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
# See colored 'git log' with lines changes in Terminal on Mac | |
# => * 1234567 - 2001-01-01 - NNNNN - description <user> | |
# Based on http://www.jukie.net/bart/blog/pimping-out-git-log | |
# git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative" | |
# To install as 'gl' alias (not overriding 'git log'): | |
# 1) save this as ~/.gitlog.rb | |
# 2) add to ~/.bash_profile: 'alias gl="ruby ~/.gitlog.rb | more -r"' |
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
# Outside screen | |
screen # Start screen. | |
screen -ls # List sessions. | |
screen -r id # Reattach to session. | |
screen -h # Help. | |
# Inside screen | |
Ctrl+a " # List sessions | |
Ctrl+a d # Detach session. | |
Ctrl+a ? # Help. |
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
# https://github.com/ln/xmpp4r | |
# gem install xmpp4r | |
require 'xmpp4r' | |
email = ADD_EMAIL | |
password = ADD_PASSWORD | |
friends_email = ADD_EMAIL | |
client = Jabber::Client::new(Jabber::JID::new(email)) | |
client.connect("talk.google.com") | |
client.auth(password) | |
client.send(Jabber::Presence.new.set_type(:subscribe).set_to(friends_email)) |
NewerOlder