Skip to content

Instantly share code, notes, and snippets.

View mehranhadidi's full-sized avatar
🚀

Mehran Hadidi mehranhadidi

🚀
  • Solvd
View GitHub Profile
#
# REQUIRES:
# - server (the forge server instance)
# - site_name (the name of the site folder)
# - sudo_password (random password for sudo)
# - db_password (random password for database user)
# - event_id (the provisioning event name)
# - callback (the callback URL)
#
@mehranhadidi
mehranhadidi / gist:006ae3bcddb74ad80f2d284cc4b20c48
Last active May 29, 2017 05:29
Create an static call on normal methods php
<?php
class Test
{
static function __callStatic($method, $args)
{
return self::new()->{$method}(...$args);
}
private static function new(...$args)
@mehranhadidi
mehranhadidi / php-useful-tools.md
Last active February 19, 2017 09:26
php usefull tools
@mehranhadidi
mehranhadidi / gist:3bbd0af99bafa8bba764bc4b39d9659d
Last active February 16, 2017 07:56
Dev Machine setup (Ubuntu 16.10)

Check For Updates

  • sudo apt-get update
  • sudo apt-get upgrade

XCode

  • Install XCode from App Store.
  • Open XCode and agree to terms and conditions.

XCode CLI Tools

  • xcode-select --install

Install Homebrew

@mehranhadidi
mehranhadidi / tmux.md
Created February 7, 2017 08:23 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@mehranhadidi
mehranhadidi / RouteServiceProvider.php
Created January 25, 2017 09:06 — forked from danielmorgan/RouteServiceProvider.php
Move auth routes to userland code in Laravel 5.3
# app/providers/RouteServiceProvider.php
<?php
namespace App\Providers;
use Illuminate\Support\Facades\Route;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
class RouteServiceProvider extends ServiceProvider
@mehranhadidi
mehranhadidi / API.md
Created January 22, 2017 14:13 — forked from iros/API.md
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

@mehranhadidi
mehranhadidi / alias
Created December 13, 2016 13:12
useful alias on ubuntu
# add these lines to ~/.bashrc
#aliases
source ~/.aliases
# create file ~/.aliases and add these lines to that file.
# git
alias gs='git status'
alias ga='git add'
alias gc='git commit -m'
@mehranhadidi
mehranhadidi / principais_packages.md
Created December 6, 2016 08:34 — forked from vluzrmos/principais_packages.md
Lista dos principais packages para Laravel citados no 16º Hangout Laravel Brasil.