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
# Why do we need KudeURI? Because the URI.join method doing something stupid: | |
# | |
# URI.join('http://example.com/subpath', 'hello', '?token=secret') | |
# => “http://example.com/hello?token=secret” | |
# | |
# But what I expected is “http://example.com/subpath/hello?token=secret", the subpath is gone. | |
# By using SmartURI, you can handle the case above gracefully: | |
# | |
# SmartURI.join('http://example.com/subpath', 'hello', query: { token: secret }) | |
# => "http://example.com/subpath/hello?token=secret" |
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
# Generate Random Passwords | |
curl 'https://www.random.org/passwords/?num=2&len=24&format=plain&rnd=new' | |
# Create deploy user | |
sudo adduser deploy | |
sudo adduser deploy sudo | |
su deploy | |
cd ../deploy/ | |
# Generate ssh keys |