Skip to content

Instantly share code, notes, and snippets.

View mike1011-nattyhatty's full-sized avatar

mike1011-nattyhatty

View GitHub Profile

Change SSH Port and Disable Root Login

Edit SSH Config File (You need sudo permission)

vi /etc/ssh/sshd_config

Update/Uncomment the # Port 22 line and change the port number to something else, let's say 9044, to be something similar to the following:

Port 9044

Disable Root Login, by uncommenting # PermitRootLogin yes and change it to

Arel Cheatsheet on Steroids

A (more) complete cheatsheet for Arel, including NamedFunction functions, raw SQL and window functions.

Tables

posts = Arel::Table.new(:posts)
posts = Post.arel_table # ActiveRecord

Table alias