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 / _ide_helper.php
Created February 7, 2018 18:47 — forked from barryvdh/_ide_helper.php
Laravel IDE Helper for Netbeans / PhpStorm / Sublime Text 2 CodeIntel, generated using https://github.com/barryvdh/laravel-ide-helper
<?php
/**
* A helper file for Laravel 5, to provide autocomplete information to your IDE
* Generated for Laravel 5.5.13 on 2017-09-28.
*
* @author Barry vd. Heuvel <barryvdh@gmail.com>
* @see https://github.com/barryvdh/laravel-ide-helper
*/
namespace {
exit("This file should not be included, only analyzed by your IDE");
.type.storage,.type.storage.declaration, .storage.class.modifier {
font-family: 'Script12PitchBT';
font-size: 1.7em;
}
.type.storage.arrow.function {
font-family: 'Fira Code'
}
.decorator.name, .decorator.punctuation:not(.block), .import.keyword {
@moaalaa
moaalaa / cloudSettings
Last active February 3, 2019 15:20
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-02-03T15:20:41.784Z","extensionVersion":"v3.2.4"}
@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.
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 / 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
@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);
<?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 / 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
@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)