Skip to content

Instantly share code, notes, and snippets.

View acushlakoncept's full-sized avatar
🎯
Focusing

Uduak Essien acushlakoncept

🎯
Focusing
View GitHub Profile
# 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"
@acushlakoncept
acushlakoncept / youtube-video-commands
Created May 31, 2022 10:22 — forked from ThomasBush/youtube-video-commands
Ubuntu 20.04 Focal Fossa Rails server setup
# 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