Skip to content

Instantly share code, notes, and snippets.

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@shaband
shaband / docker-compose.yml
Created September 3, 2022 21:35
shared containers
version: "3"
# Creates Mysql container and phpMyAdmin service to manage it
services:
mysql:
image: mysql:latest
container_name: mysql
hostname: mysql
restart: unless-stopped
tty: true
volumes:
@shaband
shaband / HasTransalations.php
Created November 15, 2021 11:28
skip unicode for json array model
<?php
trait HasTranslations{
use \Spatie\Translatable\HasTranslations;
/**
* Decode the given JSON back into an array or object.
*
* @param string $value

switch PHP Version of Laravel Valet on Linux (ubuntu , debain, linux mint)

put this in your .profile

switch-php() {
    valet stop
    sudo update-alternatives --set php /usr/bin/php$1
    sudo update-alternatives --set php-config /usr/bin/php-config$1
 sudo update-alternatives --set phpize /usr/bin/phpize$1
@shaband
shaband / gist:43108fec8b068de85ede599f647db9d2
Created September 9, 2020 22:49 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
@shaband
shaband / gist:6cc60945fd78b31988d56a4519534ad5
Created September 9, 2020 22:49 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
@shaband
shaband / .bash_aliases
Created July 27, 2020 20:39
linux alias
alias art='php artisan'
alias work='cd /var/www/html'
alias wip='git add . && git commit -m "wip"'
alias nah='git reset --hard && git clean -df'
alias g='git'
alias c='composer'
alias cr='composer require'
alias cda='composer dumpautoload'
@shaband
shaband / gist:08f3457e6bd97451421590d14094a23e
Created February 19, 2020 12:58 — forked from rolinger/gist:d6500d65128db95f004041c2b636753a
PHP => FCM Push notification tutorial for Android and iOS
Below is a full tutorial on how to setup and use Googles Firebase push notification API for both Android and iOS. It is based on this
earlier implementation of Googles GCM method: https://gist.github.com/prime31/5675017 - FCM is the new method and GCM will eventually be
retired.
## THE BELOW METHOD IS THE NEWER FCM METHOD:
Register your app in the FCM Console: https://console.firebase.google.com (add project)
1. Click on the newly added project, in the upper left menu is the "Overview" and Gear Settings.
2. Click on the GEAR settings icon, and then on "Project Settings"
3. In the main screen, click on "Cloud Messaging"
@shaband
shaband / gist:da3e1d94a722e83ec0364f8313b57085
Created February 19, 2020 12:58 — forked from rolinger/gist:d6500d65128db95f004041c2b636753a
PHP => FCM Push notification tutorial for Android and iOS
Below is a full tutorial on how to setup and use Googles Firebase push notification API for both Android and iOS. It is based on this
earlier implementation of Googles GCM method: https://gist.github.com/prime31/5675017 - FCM is the new method and GCM will eventually be
retired.
## THE BELOW METHOD IS THE NEWER FCM METHOD:
Register your app in the FCM Console: https://console.firebase.google.com (add project)
1. Click on the newly added project, in the upper left menu is the "Overview" and Gear Settings.
2. Click on the GEAR settings icon, and then on "Project Settings"
3. In the main screen, click on "Cloud Messaging"
@shaband
shaband / custom-domain-localhost-xampp
Created April 4, 2019 12:27 — 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