Skip to content

Instantly share code, notes, and snippets.

View moaalaa's full-sized avatar

Mohamed Alaa El-Din moaalaa

View GitHub Profile
@moaalaa
moaalaa / zsh.md
Created October 29, 2018 12:42 — forked from tsabat/zsh.md
Getting oh-my-zsh to work in Ubuntu
@moaalaa
moaalaa / 01 - zsh.md
Last active October 25, 2025 18:51
For Every New Ubunut or Linux Mint

Installing ZSH

1. Install ZSH

# Ubuntu
sudo apt install zsh

# Fedora
sudo dnf install zsh
@moaalaa
moaalaa / sample.md
Last active December 23, 2018 15:01 — forked from bradtraversy/sample.md
Markdown Cheat Sheet

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

This text is italic

@moaalaa
moaalaa / webdev_online_resources.md
Created July 17, 2018 00:01 — forked from bradtraversy/webdev_online_resources.md
Online Resources For Web Developers (No Downloading)
@moaalaa
moaalaa / ssh.txt
Created July 8, 2018 20:04 — forked from bradtraversy/ssh.md
SSH & DevOps Crash Course Snippets
# Login via SSH with password (LOCAL SERVER)
> ssh brad@192.168.1.29
# Create folder, file, install Apache (Just messing around)
mkdir test
cd test
touch hello.txt
sudo apt-get install apache2
# Generate Keys
<?php
class CustomSessionHandler extends \SessionHandler
{
private $sessionName = 'SESSION_NAME';
private $sessionMaxLifeTime = 0;
private $sessionSSL = true;
private $sessionHTTPOnly = true;
private $sessionPath = '/';
private $sessionDomain = '127.0.0.1'; // EX: .domain.com
@moaalaa
moaalaa / logout.php
Last active June 8, 2018 17:17
best and more effectively logout page
<?php
session_start(); // if you start it already no need for it
session_unset(); // unset all session variables
session_destroy(); // destroy the session completely
session_write_close(); // close the session write
setcookie(session_name(),'',0,'/');
session_regenerate_id(true);
@moaalaa
moaalaa / set-custom-domain-on-localhost-with-xampp
Created June 6, 2018 07:28 — forked from sudhir600/set-custom-domain-on-localhost-with-xampp
How to add a custom domain name on your localhost using XAMPP. Codes are based on Windows, but Step 2 onward are pretty much applicable on other operating system.
Step 1:
Go to: C:\Windows\System32\Drivers\etc\hosts
And add this to the bottom of the file:
=============
127.0.0.1 your.domain.com
=============
Step 2:
Go to [your XAMPP directory]/apache/conf/httpd-xampp.conf
set nocompatible " We ant latest vim settings/options.
so ~/.vim/plugins.vim
syntax enable
set backspace=indent,eol,start "Make Backspace behave like every other editors.
let mapleader = ',' "The defualt leader is \, but , is much better.
set number "Let's activate the line number.
@moaalaa
moaalaa / _vimrc
Last active May 18, 2018 16:05
After Install Vundle.vim Do The Next Note For windows .vimrc will be _vimrc and for .vim it will be vimfiles
set nocompatible " We ant latest vim settings/options.
so $HOME/vimfiles/plugins.vim
syntax enable
set backspace=indent,eol,start "Make Backspace behave like every other editors.
let mapleader = ',' "The defualt leader is \, but , is much better.
set number "Let's activate the line number.