Skip to content

Instantly share code, notes, and snippets.

Avatar
:bowtie:
Working from home..

Amro Khaled amrography

:bowtie:
Working from home..
View GitHub Profile
@amrography
amrography / git-deployment.md
Created Nov 18, 2021 — forked from noelboss/git-deployment.md
Simple automated GIT Deployment using Hooks
View git-deployment.md

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@amrography
amrography / mysql.sh
Last active Apr 29, 2021
[Change mysql password] Update mysql password using command line #mysql
View mysql.sh
ALTER USER 'root'@'localhost' IDENTIFIED BY 'password';
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
FLUSH PRIVILEGES;
@amrography
amrography / README.md
Last active Apr 29, 2021
Set cookie in postman pre-request for Laravel Nova #api
View README.md

Postman pre-request snippet for Laravel Nova

Get XSRF token and set it to a cookie variable in postman for using later.

@amrography
amrography / _background-variant-transparent.scss
Last active Sep 26, 2020
Extend bootstrap 4 with transparent background from bootstrap theme colors
View _background-variant-transparent.scss
/**
* USAGE
*
* <div class="bg-light-65"></div>
* <div class="bg-primary-20"></div>
*
* <a href="#" class="btn btn-danger-50">Button too</a>
* ...
*/
@amrography
amrography / SelectCity.php
Created Jul 6, 2020
Livewire select drop menu example
View SelectCity.php
<?php
// file path, app/Http/Livewire/SelectCity.php
namespace App\Http\Livewire;
use Livewire\Component;
class SelectCity extends Component
{
View 2020_06_17_072617_asssign_products_foreign_keys.php
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AsssignProductsForeignKeys extends Migration
{
/**
* Run the migrations.
@amrography
amrography / archive.sh
Created Sep 3, 2018
Create archive of files changed between 2 gits commits
View archive.sh
zip modified-files.zip $(git diff --name-only HASH1 HASH2)