Skip to content

Instantly share code, notes, and snippets.

@nathandaly
nathandaly / BaseResource.php
Last active May 13, 2024 22:35
Tenancy for Laravel & Filament V3 (Tenant per database)
<?php
/**
* Below is an the extended Filament resource your tenant panel resources
* will have to extend so that the queries are scoped properly.
*/
namespace App\Filament;
use Filament\Resources\Resource;
@chrisdone
chrisdone / Printf.idr
Last active May 13, 2024 22:34
Type-safe dependently-typed printf in Idris
module Printf
%default total
-- Formatting AST.
data Format
= FInt Format
| FString Format
| FOther Char Format
| FEnd
@Joao-Peterson
Joao-Peterson / gmk67-manual.md
Last active May 13, 2024 22:34
GMK67 manual (English)
@JustinFincher
JustinFincher / Table.swift
Created July 28, 2023 02:55
Recursive Outline Table
import SwiftUI
struct TestModel: Identifiable {
let id = UUID()
var children: [TestModel]? {
(0..<5).map { _ in
TestModel()
}
}
}
@Ivoah
Ivoah / p8.py
Created April 4, 2016 17:23
Download all PICO-8 carts from lexaloffle BBS
from requests import get
from bs4 import BeautifulSoup
import re
import os
def make_filename(fname):
for c in ',! ().':
fname = fname.replace(c, '_')
while fname != fname.replace('__', '_'):
fname = fname.replace('__', '_')
@AlexString
AlexString / InstallPipewireFedora.md
Created December 7, 2021 19:30
Install Pipewire on Fedora

Install Pipewire on Fedora

pactl info to show which audio server is running. In occasions this tends to fail showing Connection failure: connection refused. I think this is saying that there is no connection to an audio server so you'll need to enable manually the service using systemctl. please comment about it if you know more of this.

Install pipewire

If you try installing pipewire without removing pulseaudio you'll get a conflict message complaining about it.

@umayr
umayr / recover-deleted-branch.sh
Created April 1, 2016 11:41
How to recover a deleted branch
## Pre-requisite: You have to know your last commit message from your deleted branch.
git reflog
# Search for message in the list
# a901eda HEAD@{18}: commit: <last commit message>
# Now you have two options, either checkout revision or HEAD
git checkout a901eda
# Or
git checkout HEAD@{18}
@hyperupcall
hyperupcall / settings.jsonc
Last active May 13, 2024 22:21
VSCode config to disable popular extensions' annoyances (telemetry, notifications, welcome pages, etc.)
// I'm tired of extensions that automatically:
// - show welcome pages / walkthroughs
// - show release notes
// - send telemetry
// - recommend things
//
// This disables all of that stuff.
// If you have more config, leave a comment so I can add it!!
{
@Schemetrical
Schemetrical / The_Jaunt.md
Last active May 13, 2024 22:21
The Jaunt by Stephen King

Chapter 1

"This is the last call for Jaunt-701," the pleasant female voice echoed through the Blue Concourse of New York's Port Authority Terminal. The PAT had not changed much in the last three hundred years or so - it was still gungy and a little frightening. The automated female voice was probably the most plesant thing about it. "This is Jaunt Service to Whitehead City, Mars," the voice continued. "All ticketed passengers should now be in the Blue Concourse sleep lounge. Make sure your validation papers are in order. Thank you."The upstairs lounge was not at all grungy. It was wall-to-wall carpeted in oyster gray. The walls were an eggshell white and hung with plesant nonrepresentational prints. A steady, soothing progression of colors met and swirled on the ceiling. There were one hundred couches in the large room, neatly spaced in rows of ten. Five Jaunt attendants circulate, speakingin low, cherry voices and offering glasses of milk. At one side of the room was the entranceway, flanked by armed guar