Skip to content

Instantly share code, notes, and snippets.

@Phuoc95
Phuoc95 / php-version.sh
Created June 27, 2024 14:39 — forked from dinhquochan/php-version.sh
PHP Versions Switcher
function phpv() {
valet stop
brew unlink php@7.4 php
brew link --force --overwrite $1
brew services start $1
composer global update
rm -f ~/.config/valet/valet.sock
valet install
}
@Phuoc95
Phuoc95 / firebase-messaging-sw.js
Created September 28, 2023 02:55 — forked from loicginoux/firebase-messaging-sw.js
Adding FCM to an html page to receive notifications and sending then via FCM ruby gem. (edit: HTTPS needed!)
// [START initialize_firebase_in_sw]
// Give the service worker access to Firebase Messaging.
// Note that you can only use Firebase Messaging here, other Firebase libraries
// are not available in the service worker.
importScripts('https://www.gstatic.com/firebasejs/3.5.2/firebase-app.js');
importScripts('https://www.gstatic.com/firebasejs/3.5.2/firebase-messaging.js');
// Initialize the Firebase app in the service worker by passing in the
// messagingSenderId.
firebase.initializeApp({
@Phuoc95
Phuoc95 / pint.json
Created May 10, 2023 14:28 — forked from hungthai1401/pint.json
Laravel Pint configuration
{
"preset": "psr12",
"rules": {
"align_multiline_comment": true,
"array_indentation": true,
"array_syntax": true,
"blank_line_after_namespace": true,
"blank_line_after_opening_tag": true,
"combine_consecutive_issets": true,
"combine_consecutive_unsets": true,
### Keybase proof
I hereby claim:
* I am phuoc95 on github.
* I am phuoctk (https://keybase.io/phuoctk) on keybase.
* I have a public key ASDhERZaUy7tM9_HLUhUN-3hv-WCCb__xh24kY81SXIZWAo
To claim this, I am signing this object: