Skip to content

Instantly share code, notes, and snippets.

@mss
mss / ifupdown-to-netplan.txt
Last active May 7, 2024 18:06
Migrate from ifupdown to netplan
# Tested on an upgraded Ubuntu 20.04
apt install netplan.io
systemctl unmask systemd-networkd.service
systemctl unmask systemd-resolved.service
ENABLE_TEST_COMMANDS=1 netplan migrate
netplan try
reboot
apt purge ifupdown resolvconf
ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
<?
// this script receives a Stripe dispute / chargeback and:
//
// - immediately refunds the payment
// - closes the user's account (in my DB, add your own code there)
//
// this is to automate dispute handling (because you never win a dispute on Stripe anyway)
// and by refunding avoiding the chargeback fee
//
@juanbrujo
juanbrujo / PlayStationBIOSFilesNAEUJP.md
Last active May 7, 2024 17:59
Files for PlayStation BIOS Files NA-EU-JP
@TheSirC
TheSirC / shell.nix
Last active May 7, 2024 17:59
egui/eframe with NixOS
{ pkgs ? import <nixpkgs> { overlays = [ (import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz)) ]; } }:
with pkgs;
mkShell {
nativeBuildInputs = with xorg; [
libxcb
libXcursor
libXrandr
libXi
@avataru
avataru / EloquentCheatSheet.md
Last active May 7, 2024 17:59
Eloquent relationships cheat sheet
NetLimiter 3
Registration name: Peter Raheli
Registration code: C99A2-QSSUD-2CSBG-TSRPN-A2BEB
NetLimiter 4
Registration Name: Vladimir Putin #2
Registration Code: XLEVD-PNASB-6A3BD-Z72GJ-SPAH7
https://www.netlimiter.com/download
# Netlimiter Full Netlimiter Activated Netlimiter cracked Netlimiter Full Version Netlimiter Serial Netlimiter keygen Netlimiter crack Netlimiter 4 serial Netlimiter 4 Crack Netlimiter 4 register Netlimiter 4 patch Netlimiter full Full version Netlimiter 4 Activated Netlimiter 4 Cracked Netlimiter Pro
@rbrath
rbrath / LandGrid.js
Last active May 7, 2024 17:57
Equal Size Cartogram
var landGrid = [
{
"X": "1",
"Y": "1"
},
{
"X": "1",
"Y": "2"
},
{
@Huud
Huud / Generate Normal Map From Height Map.py
Last active May 7, 2024 17:55
Generate Normal Map From Height Map
# A fast - numpy based - CPU functions that take a height map and generate a normal map from it
import numpy as np
import matplotlib.image as mpimg
# a function that takes a vector - three numbers - and normalize it, i.e make it's length = 1
def normalizeRGB(vec):
length = np.sqrt(vec[:,:,0]**2 + vec[:,:,1]**2 + vec[:,:,2]**2)
vec[:,:,0] = vec[:,:,0] / length
vec[:,:,1] = vec[:,:,1] / length
@JBlond
JBlond / bash-colors.md
Last active May 7, 2024 17:55 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
@td-shi
td-shi / ulid.sh
Last active May 7, 2024 17:55
ULID on shell script. Universally Unique Lexicographically Sortable Identifier. [ULID](https://github.com/ulid/spec)
#!/bin/sh
# -*- coding:utf-8 posix -*-
# === Initialize shell environment =============================================
#set -u # Just stop undefined values.
#set -e # Just stop error.
#set -x # Debug running command.
umask 0022
export LC_ALL=C
export LANG=C