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
# This is a short collection of tools that are useful for managing your | |
# known_hosts file. In this case, I'm using the '-f' flag to specify the | |
# global known_hosts file because I'll be adding many deploy users on this | |
# system. Simply omit the -f flag to operate on ~/.ssh/known_hosts | |
# Add entry for host | |
ssh-keyscan -H github.com > /etc/ssh/ssh_known_hosts | |
# Scan known hosts | |
ssh-keygen -f /etc/ssh/ssh_known_hosts -H -F github.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
# https://gist.github.com/francisco-rojas/db0fb04ed6aa509acc18 | |
# https://dev.firmafon.dk/blog/drat-ruby-has-a-double-splat/ | |
# http://blog.simplificator.com/2015/03/20/ruby-and-the-double-splat-operator/ | |
# http://chriszetter.com/blog/2012/11/02/keyword-arguments-in-ruby-2-dot-0/ | |
# ------------------------------------------------------Method Definition----------------------------------------------------- | |
puts "\n---Method Definition---\n" | |
def say(what, *people) | |
people.each { |person| puts "#{person}: #{what}" } | |
end | |
say "Hello!", "Alice", "Bob", "Carl" |
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
# http://devrandom.postr.hu/offline-ruby-core-and-stdlib-documentation-with-yard | |
$ gem install yard | |
$ wget ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p247.tar.gz | |
$ tar xzvf ruby-2.0.0-p247.tar.gz | |
$ cd ruby-2.0.0-p247 | |
$ yardoc *.c | |
$ yardoc -b .yardoc-stdlib -o doc-stdlib | |
$ yard server -m ruby-core2.0 .yardoc stdlib .yardoc-stdlib |