Skip to content

Instantly share code, notes, and snippets.

View mostafa6765's full-sized avatar
👨‍💻
code

Mostafa Kamal mostafa6765

👨‍💻
code
View GitHub Profile
@mostafa6765
mostafa6765 / LoginController.php
Last active September 29, 2017 21:37
Socialite laravel
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
use Illuminate\Contracts\Auth\Authenticatable;
use Socialite;
use App\User;
use Auth;
@mostafa6765
mostafa6765 / Additional_and_username_or_email.php
Last active September 30, 2017 16:36
Laravel Addiotional and username_or_email login
<?php
// this is LoginController
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
use Auth;
@mostafa6765
mostafa6765 / mapGetter-error-Vuex-laravel-mix.md
Last active October 18, 2017 21:59
map issue vuex babel vue

Running the following:

yarn add --dev babel-preset-es2015 babel-preset-stage-2

Then creating a .babelrc in the root of our project with:

{
    "presets": ["es2015", "stage-2"]
}
@mostafa6765
mostafa6765 / SimplePagination.vue
Created November 1, 2017 03:02 — forked from saqueib/SimplePagination.vue
VueJS pagination component to paginate anything in Laravel, checkout the tutorial on http://wp.me/p8cmxL-b7 by www.qcode.in
<template>
<div :class="{'loading': loading}" class="pager-data-wrapper">
<!-- Pagination Slot -->
<slot :result="getResult()">
<div class="text-center alert-info pb-3">
<span v-if="!loading">
{{ result.length }} items found. render it using v-for="item in result"
</span>
<span v-if="loading">
@mostafa6765
mostafa6765 / cio.asm
Created November 6, 2017 06:48 — forked from sanjibnarzary/cio.asm
Character Input Output in ASM using NASM in UBUNTU Linux
;Author : Sanjib Narzary
;Institute: NIT Calicut
;Email: o-._.-o@live.com
;Assembly Code
section .data
;New line string
NEWLINE: db 0xa, 0xd
LENGTH: equ $-NEWLINE
section .bss
INPT: resd 1
@mostafa6765
mostafa6765 / git_cheat-sheet.md
Created January 20, 2018 20:06 — forked from davfre/git_cheat-sheet.md
git commandline cheat-sheet
<?php
$result = [];
$task = 'deploy';
$live = true;
$process = new \Symfony\Component\Process\Process('/Applications/MAMP/bin/php/php7.1.0/bin/php ~/.composer/vendor/bin/envoy run '. $task);
$process->setTimeout(3600);
$process->setIdleTimeout(300);
$process->setWorkingDirectory(base_path());
$process->run(
@mostafa6765
mostafa6765 / zsh-linux.md
Last active March 24, 2018 17:13 — forked from derhuerst/intro.md
Installing the Z Shell (zsh) on Linux, Mac OS X and Windows

Installing zsh on Linux

Some Linux systems come preloaded with zsh. You can check if it exists as well as its version by writing zsh --version in a terminal window. In case this zsh version is ok for you, you're done now!

Determine on which Linux distribution your system is based on. See List of Linux distributions – Wikipedia for a list. Most Linux systems – including Ubuntu – are Debian-based.

Debian-based linux systems

Open a terminal window. Copy & paste the following into the terminal window and hit Return. You may be prompted to enter your password.

@mostafa6765
mostafa6765 / custom-domain-localhost-xampp
Created July 19, 2018 19:20 — forked from oozman/custom-domain-localhost-xampp
How to add a custom domain name on your localhost using XAMPP. Codes are based on Windows, but Step 2 onwards 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