Skip to content

Instantly share code, notes, and snippets.

View nhalstead's full-sized avatar
👨‍💻
Something. Maybe cool

Noah Halstead nhalstead

👨‍💻
Something. Maybe cool
View GitHub Profile
@fabiolimace
fabiolimace / UUIDv6.sql
Last active April 30, 2025 13:22
Functions for generating UUIDv6 and UUIDv7 on PostgreSQL
/*
* MIT License
*
* Copyright (c) 2023-2024 Fabio Lima
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@JhowRaul10
JhowRaul10 / HandlePutFormData.php
Last active March 8, 2023 12:58
Laravel: Middleware to support multipart/form-data in PUT, PATH and DELETE requests. Deals with one level of form arrays.
<?php
namespace App\Http\Middleware;
use Closure;
use Symfony\Component\HttpFoundation\ParameterBag;
use Illuminate\Support\Arr;
/**
* @author https://github.com/Stunext
@johnnypea
johnnypea / useful-one-liners.sh
Last active May 1, 2025 23:21
Useful one liners
# Run the last command as root
sudo !!
# Serve current directory tree at http://$HOSTNAME:8000/
python -m SimpleHTTPServer
# Save a file you edited in vim without the needed permissions
:w !sudo tee %
# change to the previous working directory
cd -
# Runs previous command but replacing
^foo^bar
@hcgonzalezpr
hcgonzalezpr / socat-minecraft.service
Created March 29, 2020 02:08
Minecraft systemd broadcast proxy socat example
[Unit]
Description=Socat Minecraft
[Service]
Type=simple
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=socat-minecraft
ExecStart=/usr/bin/socat UDP4-LISTEN:19132,broadcast,fork UDP4-SENDTO:123.456.789.123:19132
*@0-180.com
*@0-420.com
*@0-900.com
*@0-aa.com
*@0-mail.com
*@0-z.xyz
*@00-mail.com
*@000476.com
*@000invaliddomain.local
*@001.igg.biz
@cvan
cvan / nice-popup.js
Last active February 2, 2021 20:51
(() => {
const width = window.outerWidth / 2;
const height = window.outerHeight / 2;
const top = 0;
const left = width * 3;
const popupEl = window.open('http://example.com', 'preview', `height=${height},width=${width},scrollbars=yes,left=${left},top=${top}`);
popupEl.focus();
})();
@nhalstead
nhalstead / LockColumns.php
Created January 21, 2020 04:52 — forked from nullthoughts/LockColumns.php
Lock columns/attributes from updates in Laravel
<?php
namespace App\Traits;
trait LockColumns
{
/**
* Cast locked_columns as a JSON column
*
* @return void
@mpyw
mpyw / free_email_provider_domains.txt
Last active March 26, 2025 20:53 — forked from tbrianjones/free_email_provider_domains.txt
A list of free email provider domains. All forks from the original gist are merged. The list only contains valid hostnames.
0039.cf
0039.ga
0039.ml
00b2bcr51qv59xst2.cf
00b2bcr51qv59xst2.ga
00b2bcr51qv59xst2.ml
02466.cf
02466.ga
02466.ml
07819.cf
@koresar
koresar / verify-signature.js
Last active May 26, 2023 20:29
WebAuthn "none" signature verification
// The code below was largely taken from:
// https://github.com/strangerlabs/webauthn/blob/9959cb2b5f87692b8b1fecd799dd4029a3bf61b1/src/Webauthn.js#L501
const crypto = require("crypto");
const base64url = require("base64url");
const cbor = require("cbor");
function parseAttestationObject(attestationObject) {
const attestationObjectBuffer = base64url.toBuffer(attestationObject);
return cbor.decodeAllSync(attestationObjectBuffer)[0];
@Mau5Machine
Mau5Machine / dynamic.yaml
Last active January 31, 2023 08:05
Traefik Dynamic Configuration File
## Setting up the middleware for redirect to https ##
http:
middlewares:
redirect:
redirectScheme:
scheme: https