Skip to content

Instantly share code, notes, and snippets.

Muhammad Al-jefry mhmdAljefri

View GitHub Profile
View code_spliting_hoc.js
import React from 'react'
const codeSplittingHoc = impoertComponent =>
class componentName extends React.Component {
state = {
component: null // default state for component
async componentDidMount() {
const { default: component } = await impoertComponent(); // import default from function and assign it to component
View zsh
# Zsh
sudo apt install zsh
# If you have problem with adminstration folder
# remove lock folder from desk and cash follow next setps (optioal)
sudo rm /var/lib/apt/lists/lock
#remove from cash
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock
View Postgresql cmd
# instructio of first using postger
sudo -u postgres psql
#command above open cli as super admin
sudo -u postgres createuser <username>
mhmdAljefri /
Created Jan 25, 2018 — forked from maxivak/
Sending emails with ActionMailer and Sidekiq

Sending emails with ActionMailer and Sidekiq

Send email asynchroniously using Sidekiq.


Create your mailer us usual:

mhmdAljefri /
Created Jan 8, 2018 — forked from Kartones/
PostgreSQL command line cheatsheet


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 /
Last active Feb 27, 2019 — forked from ali-sheiba/
Setup Ubuntu Server with Ngnix + MySQL + Redis + Git + RVM + Ruby 2.4.0 + Ruby On Rails
# 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
You can’t perform that action at this time.