Skip to content

Instantly share code, notes, and snippets.

@jamesbar2
jamesbar2 / postal-codes.json
Last active May 7, 2024 14:17 — forked from matthewbednarski/postal-codes.json
Global postal codes regex formats
[{
"Note": "The first two digits (ranging from 10–43) correspond to the province, while the last two digits correspond either to the city/delivery zone (range 01–50) or to the district/delivery zone (range 51–99). Afghanistan Postal code lookup",
"Country": "Afghanistan",
"ISO": "AF",
"Format": "NNNN",
"Regex": "^\\d{4}$"
}, {
"Note": "With Finland, first two numbers are 22.",
"Country": "Åland Islands",
"ISO": "AX",
@fortunecookiezen
fortunecookiezen / Jenkinsfile
Last active May 7, 2024 14:15
terraform-parameterized-jenkinsfile-with-approval
pipeline {
agent {
docker {
image 'hashicorp/terraform:light'
args '--entrypoint="" -u root'
}
}
environment {
AWS_ACCESS_KEY_ID = credentials('DEV_AWS_ACCESS_KEY_ID')
AWS_SECRET_ACCESS_KEY = credentials('DEV_AWS_SECRET_ACCESS_KEY')
@lorenzleutgeb
lorenzleutgeb / rad-wire.sh
Last active May 7, 2024 14:15
rad-wire
#! /bin/sh
set -eu
JQ="jq --unbuffered --color-output"
JQ_TX="JQ_COLORS='1;30:0;39:0;39:0;39:1;35:1;39:1;39:1;31' $JQ | sed 's/^/>/'"
JQ_RX="JQ_COLORS='0;90:0;37:0;37:0;37:0;32:1;37:1;37:1;34' $JQ | sed 's/^/</'"
SOCKET="${RAD_HOME:-"${HOME}/.radicle"}/node/control.sock"
if [ ! -S "${SOCKET}" ]
@lorenzleutgeb
lorenzleutgeb / rad-alternate.sh
Last active May 7, 2024 14:14
rad-alternate
#! /bin/sh
set -eu
REMOTE="rad"
ALTERNATES="$(git rev-parse --absolute-git-dir)/objects/info/alternates"
URI=$(git remote get-url "$REMOTE")
if [ "${URI:0:6}" != "rad://" ]
then
echo "URL for remote '$REMOTE' does not have expected prefix 'rad://'. Aborting."
@neremin
neremin / winsxs_ntfs_compress.bat
Last active May 7, 2024 14:13
WinSxS folder compression script
@ECHO off
net session >nul 2>&1
IF %ERRORLEVEL% NEQ 0 GOTO ELEVATE
@GOTO ADMINTASKS
:ELEVATE
ECHO Elevated privileges are temporarily required to run script
cd /d %~dp0
mshta "javascript: var shell = new ActiveXObject('Shell.Application'); shell.ShellExecute('%~nx0', '', '', 'runas', 1); close();"
@tkrotoff
tkrotoff / FrontendFrameworksPopularity.md
Last active May 7, 2024 14:13
Front-end frameworks popularity (React, Vue, Angular and Svelte)
@ddelange
ddelange / Installing PyICU, libpostal, pypostal on Mac OS X 10.14+.md
Last active May 7, 2024 14:12
Installation instructions for libicu-dev, PyICU, libpostal, pypostal on Mac OS X 10.14+

Installing PyICU, libpostal, pypostal on Mac OS X 10.14+

libicu-dev (PyICU dependency)

brew uninstall --ignore-dependencies icu4c
brew install pkg-config icu4c  # keg-only
@yasirkula
yasirkula / CustomRectHandles.cs
Created August 7, 2021 15:15
Drawing Rect handles in Unity (similar to built-in Rect tool)
using System.Collections.Generic;
using System.Reflection;
using UnityEditor;
using UnityEngine;
using UnityEngine.Rendering;
public class CustomRectHandles : ScriptableObject
{
public class Rect3D
{
@Kurotaku-sama
Kurotaku-sama / Twitch hitsquadgodfather command buttons.user.js
Last active May 7, 2024 14:17
Adds buttons to send commands for the onstream games in the twitch chat
// ==UserScript==
// @name Twitch hitsquadgodfather command buttons
// @namespace kurotaku.de
// @version 1.5.3
// @description Adds buttons to send commands for the onstream games in the Twitch chat
// @author Kurotaku
// @license MIT
// @match https://www.twitch.tv/hitsquadgodfather*
// @match https://www.twitch.tv/hitsquadbrawlers*
// @match https://www.twitch.tv/hitsquadplays*
@yovko
yovko / ohmyzsh.md
Last active May 7, 2024 14:11
ZSH (using Oh My ZSH) on Manjaro Linux

ZSH (using Oh My ZSH) on Manjaro Linux

0. If ZSH is not already installed on your Manjaro system you can do it with the command:

sudo pacman -Syu zsh

You do not need to install manjaro-zsh-config and all the other related packages like zsh-syntax-highlighting, zsh-history-substring-search, zsh-autosuggestions, etc., as we will use Oh My Zsh.