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 / Mac.md
Last active January 14, 2018 18:59
Mac initialise via Terminal

X-code Command Line Tools

$ xcode-select --install

Oh-My-Zsh

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Install Homebrew and so

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

@m5lil
m5lil / active.md
Last active March 21, 2018 14:39
Some useful codes for websites

add .active to parent [li] of [a] current opened tag

  $(function () {
      // Navigation active
      $('ul.navbar-nav a[href="{{ "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]" }}"]').closest('li').addClass('active');
  });

copyright

@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");
with more predictable outcomes across the board.
undesirable
logical approach
appropriate
Frankly, I'm out of ideas
The pleasure is mine.
within reason of course.
@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 / 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 / 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 / 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 / yt.md
Created March 7, 2017 21:27
parse yt id
            $url = Input::get('video');
            $var_v = parse_url( $url, PHP_URL_QUERY );

            if ($var_v) {
              parse_str( $var_v, $q );
              $model->video = $q['v'];
            }

@m5lil
m5lil / order.md
Created March 7, 2017 18:00
#sortable #order #draggable #laravel
    Route::post('/menu/order', function()
    {
//        dd(Input::get('item'));
        if(Input::has('item'))
        {
            $i = 0;
            foreach(Input::get('item') as $id)
            {
                $i++;