Skip to content

Instantly share code, notes, and snippets.

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

Mahmoud Ahmed (محمود أحمد) m5lil

🏠
Working from home
View GitHub Profile
@m5lil
m5lil / README.md
Last active June 28, 2021 23:06 — forked from oodavid/README.md
Deploy your site with git #others

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@m5lil
m5lil / webkit-pseudo-elements.md
Created May 18, 2017 16:26 — forked from leostratus/webkit-pseudo-elements.md
Webkit Pseudo-Element Selectors (Shadow DOM Elements)

An ongoing project to catalogue all of these sneaky, hidden, bleeding edge selectors as I prepare my JSConf EU 2012 talk.

Everything is broken up by tag, but within each the selectors aren't particularly ordered.

I have not tested/verified all of these. Have I missed some or got it wrong? Let me know. - A

A friendly reminder that you may need to set this property on your target/selected element to get the styling results you want:

-webkit-appearance:none;

@m5lil
m5lil / laravel.md
Created May 18, 2017 18:26 — forked from aduartem/laravel.md
Laravel

Laravel

Instalar Laravel en Ubuntu

Requisitos previos:

Tener al menos instalado PHP y un motor de base de datos como por ejemplo MySQL. También se recomienda instalar un servidor web como por ejemplo Apache o Nginx.

Paso 1: Instalar CURL

@m5lil
m5lil / SetupServer.md
Last active January 19, 2018 21:12 — forked from mkhlil1288/SetupServer.md
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
@m5lil
m5lil / setup.md
Created May 19, 2017 03:09 — forked from chris-jamieson/setup.md
Set up Franz for Ubuntu
  • Download Franz for your distribution from MeetFranz.com
  • change into the same directory as the downloaded file, then sudo tar -xf Franz-linux-x64-0.9.10.tgz -C /opt/franz
  • (optional) wget "https://cdn-images-1.medium.com/max/360/1*v86tTomtFZIdqzMNpvwIZw.png" -O franz-icon.png then sudo cp franz-icon.png /opt/franz
  • (optional) sudo touch /usr/share/applications/franz.desktop then sudo vim /usr/share/applications/franz.desktop

paste the following lines into the file, then save the file:

[Desktop Entry]
Name=Franz
Comment=
@m5lil
m5lil / _ide_helper.php
Created October 27, 2017 19:44 — 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 <[email protected]>
* @see https://github.com/barryvdh/laravel-ide-helper
*/
namespace {
exit("This file should not be included, only analyzed by your IDE");
@m5lil
m5lil / DB.sql
Last active June 27, 2020 14:40 — forked from msurguy/DB.sql
[Nested drobdown Select input debend on another] Dynamic dropdown in Laravel, let's say you have multiple drop downs (selects), you click on one and the contents of the other need to be dynamically changed. One solution is to dynamically load JSON from the API and change the dropdown dynamically depending on the user choice.
CREATE TABLE `makers` (
`id` int(10) unsigned NOT NULL,
`name` varchar(255) NOT NULL,
`description` varchar(255) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
@m5lil
m5lil / README.md
Created February 20, 2018 09:24 — forked from hofmannsven/README.md
My simply MySQL Command Line Cheatsheet
@m5lil
m5lil / eloquent-cheatsheet.php
Last active October 7, 2018 00:20 — forked from hassansin/eloquent-cheatsheet.php
Laravel 5 Eloquent CheatSheet #laravel #eloquent
Model::
/*Select*/
select('col1','col2')
->select(array('col1','col2'))
->select(DB::raw('businesses.*, COUNT(reviews.id) as no_of_ratings, IFNULL(sum(reviews.score),0) as rating'))
->addSelect('col3','col4')
->distinct() // distinct select
/*From*/
@m5lil
m5lil / deployment_guide.md
Created November 10, 2019 06:31 — forked from vicgonvt/deployment_guide.md
Deployment Guide for Ubuntu Server from Scratch with Laravel