Skip to content

Instantly share code, notes, and snippets.

View mkhlil1288's full-sized avatar

Mahmoud Khalil mkhlil1288

View GitHub Profile
@mkhlil1288
mkhlil1288 / issues.md
Last active November 9, 2016 08:11
Some popular issues i'm facing continually

To make router as a repeater or AccessPoint

  1. Change router Ip to 192.168.1.200 and Disable the DHCP Server
  2. From wan make connection type (bridge), tick LAN1 LAN2 LAN3 LAN4 SSID1 SSID2 SSID3 and SSID4
  3. Choose service list only (INTERNET)
  4. Restart...
  5. Done
server {
listen 80;
server_name laravel.dev;
root /var/www/vhosts/laravel.dev/public;
index index.html index.htm index.php;
charset utf-8;
location / {
@mkhlil1288
mkhlil1288 / Ubuntu: Samba Share
Created August 10, 2016 01:14 — forked from denis-shvets/Ubuntu: Samba Share
Ubuntu: Samba Share
# sudo nano -w /etc/samba/smb.conf
[www]
comment = Web Folder
path = /home/username/www
available = yes
valid users = username
read only = no
browseable = yes
public = yes
@mkhlil1288
mkhlil1288 / install.sh
Created August 11, 2016 12:10 — forked from julien731/install.sh
Ubuntu Config
# Initial system update
sudo apt-get update && sudo apt-get upgrade
# Install system utilities
## TLP
sudo apt-get install tlp tlp-rdw
sudo tlp start
## Sublime Text 2
You need to first remove the problematic Merge List and then re-create it. Open your terminal and run the following codes:
sudo rm /var/lib/apt/lists/* -vf
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock
sudo dpkg --configure -a
sudo apt-get update && sudo apt-get upgrade
@mkhlil1288
mkhlil1288 / .vimrc
Created October 11, 2016 00:58 — forked from JeffreyWay/.vimrc
My .vimrc file
set nocompatible " Disable vi-compatibility
set t_Co=256
colorscheme xoria256
set guifont=menlo\ for\ powerline:h16
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L " Removes left hand scroll bar
set linespace=15
@mkhlil1288
mkhlil1288 / SetupServer.md
Last active May 19, 2017 02:22
Setup server ( Ubuntu 16 - LEMP - GitHooks - ... )

Setup My Server

sudo apt-get update
sudo apt-get install git
sudo apt-get install nodejs
sudo ln -s /usr/bin/nodejs /usr/bin/node
sudo apt-get install npm
sudo npm install --global gulp
@mkhlil1288
mkhlil1288 / README.md
Created November 9, 2016 11:15 — forked from aronwoost/README.md
Build auto-deploy with php and git(hub) on an EC2 Amazon AMI instance

Kind of continue from the other gist how to install LAMP on an Amazon AMI

##Install git

sudo yum install git-core

##Create ssh directory since it doesn't exists by default on the Amazon AMI

@mkhlil1288
mkhlil1288 / gravatar.md
Last active November 14, 2016 10:27
Get Gravatar with php
public static function get_gravatar( $email, $s = 80, $d = 'mm', $r = 'g', $img = false, $atts = array() ) {
    $url = 'http://www.gravatar.com/avatar/';
    $url .= md5( strtolower( trim( $email ) ) );
    $url .= "?s=$s&d=$d&r=$r";
    if ( $img ) {
        $url = '<img src="' . $url . '"';
        foreach ( $atts as $key => $val )
            $url .= ' ' . $key . '="' . $val . '"';
 $url .= ' /&gt;';
@mkhlil1288
mkhlil1288 / fix.sh
Created November 22, 2016 22:28
Fixes the permissions for Laravel
#!/bin/bash
# Copyright (c) 2016 Jacob Martin
# MIT license
# Fixes the permissions of the application for secure serving.
# Note that "www-data" is used here; feel free to change this for your own
# web server's username.
# If you don't have permissions to modify files and folders in the first place,
# this script will not work for you until you fix that with: