Skip to content

Instantly share code, notes, and snippets.

View fgilio's full-sized avatar

Franco Gilio fgilio

View GitHub Profile
@PhiloNL
PhiloNL / .env
Last active August 17, 2023 20:21
Simple, fast, and resilient open-source WebSockets server using Soketi with SSL in less than 5 minutes
PUSHER_HOST=socket.yourdomain.com
PUSHER_APP_ID=unlock
PUSHER_APP_KEY=123
PUSHER_APP_SECRET=456
PUSHER_PORT=443
PUSHER_SCHEME=https
@sindresorhus
sindresorhus / esm-package.md
Last active April 30, 2024 04:47
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@tanthammar
tanthammar / HasLinks.php
Last active July 5, 2022 18:22
No more controllers! Only Laravel LiveWire routes and a handy Eloquent Model trait.
<?php
namespace App\Some\Path;
class ShortTermMemory
{
private $store = [];
public function set($key, $value)
{
@natebeaty
natebeaty / microcosm-onix-bisac-codes.csv
Created March 27, 2020 17:43
ONIX BISAC codes from microcosm publishing database, with some manually entered codes — use at your own risk!
ANT000000 Antiques & Collectibles / General
ANT001000 Antiques & Collectibles / Americana
ANT002000 Antiques & Collectibles / Art
ANT003000 Antiques & Collectibles / Autographs
ANT005000 Antiques & Collectibles / Books
ANT006000 Antiques & Collectibles / Bottles
ANT007000 Antiques & Collectibles / Buttons & Pins
ANT008000 Antiques & Collectibles / Care & Restoration
ANT009000 Antiques & Collectibles / Transportation
ANT010000 Antiques & Collectibles / Clocks & Watches
@tonysm
tonysm / concurrent-pool.php
Last active November 1, 2023 13:08
Concurrent Requests
<?php
// 1. Register the routes
Route::get('test/{lorem}', function ($lorem) {
sleep(3);
return response()->json([
'message' => $lorem,
'token' => Str::random(),
]);
@jfcherng
jfcherng / st4-changelog.md
Last active April 20, 2024 00:25
Sublime Text 4 changelog just because it's not on the official website yet.
@fnky
fnky / stripe-keys-and-ids.tsv
Last active March 29, 2024 22:52
Stripe keys and IDs
Prefix Description Notes
ac_ Platform Client ID Identifier for an auth code/client id.
acct_ Account ID Identifier for an Account object.
aliacc_ Alipay Account ID Identifier for an Alipay account.
ba_ Bank Account ID Identifier for a Bank Account object.
btok_ Bank Token ID Identifier for a Bank Token object.
card_ Card ID Identifier for a Card object.
cbtxn_ Customer Balance Transaction ID Identifier for a Customer Balance Transaction object.
ch_ Charge ID Identifier for a Charge object.
cn_ Credit Note ID Identifier for a Credit Note object.
@javan
javan / optimized-screenshots.md
Created July 8, 2019 18:51
macOS: Optimized Screenshots
😱 Before: ~/Desktop/Screen Shot….png 4.1 MB
🏆 After: ~/Screenshots/Screen Shot….png 937 KB

  ⤵

  1. Install https://pngquant.org/
    $ brew install pngquant
@laravel-shift
laravel-shift / .shiftrc
Last active July 21, 2022 15:23
Default configuration file for setting Shift preferences
; Within this file you may set preferences for Shift.
; These may be used to customize the behavior of the
; Shift bot by disabling or guiding the automation.
; NOTE: Any paths should be relative to location
; of this file and exclude a trailing slash.
; Section to set options for PHP Shifts.
[php]