Skip to content

Instantly share code, notes, and snippets.

View mhmdAljefri's full-sized avatar
🏠
Working from home

Muhammad Al-jefry mhmdAljefri

🏠
Working from home
View GitHub Profile
@mhmdAljefri
mhmdAljefri / 00.md
Created January 25, 2018 05:58 — forked from maxivak/00.md
Sending emails with ActionMailer and Sidekiq

Sending emails with ActionMailer and Sidekiq

Send email asynchroniously using Sidekiq.

ActionMailer

Create your mailer us usual:

@mhmdAljefri
mhmdAljefri / postgres-cheatsheet.md
Created January 8, 2018 08:15 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@mhmdAljefri
mhmdAljefri / install.sh
Last active February 27, 2019 14:37 — forked from ali-sheiba/install.sh
Setup Ubuntu Server with Ngnix + MySQL + Redis + Git + RVM + Ruby 2.4.0 + Ruby On Rails
#!/bin/sh
# ngix + required packages
sudo apt update
sudo apt upgrade -y
sudo apt install curl git-core nginx build-essential tcl8.5 -y
sudo apt install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm5 libgdbm-dev
# mysql