Skip to content

Instantly share code, notes, and snippets.

@springcomp
springcomp / main.tf
Last active December 13, 2023 14:19
Terraform Issue with azurerm_storage_account
provider "azurerm" {
features {}
subscription_id = var.subscription_id
tenant_id = var.tenant_id
}
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
@springcomp
springcomp / simplelogin_default.json
Created December 4, 2023 14:05
SimpleLogin Self-Hosted Network Bridge
[
{
"Name": "simplelogin_default",
"Id": "51cb9cec7c8dc1b656c5c9b95b03349c62c4adf61418625ec88a62cff7d83248",
"Created": "2023-09-27T21:56:31.502099141Z",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
@springcomp
springcomp / README.md
Last active April 12, 2024 07:07
OpenPGP

OpenPGP

This is the procedure to migrate from the old keyring to the new toolset:

Requires software

@springcomp
springcomp / postman.js
Created July 19, 2023 07:38
Postman Sign JWT Token
// https://credentials.workday.com/docs/authentication/
// create JWT header
var alg = postman.getEnvironmentVariable('algorithm');
var jwtHeader = postman.getEnvironmentVariable('jwt-header');
var headerData = JSON.parse(jwtHeader);
headerData.alg = alg;
jwtHeader = JSON.stringify(headerData);
@springcomp
springcomp / regexes.md
Created July 12, 2023 13:24
Useful Regexes

C# TimeSpan

([0-9]+\.)?([0-1][0-9]|2[0-3])(:([0-4][0-9]|5[0-9])){2}(\.[0-9]{7})?

@springcomp
springcomp / to-pypi.sh
Created February 26, 2023 17:02
Upload Package to PyPI
#!/bin/bash
rm -rf dist/
python setup.py sdist
python setup.py bdist_wheel
## username: __token__
## password: API Key token
twine upload --repository testpypi dist/*
@springcomp
springcomp / JSON.ebnf
Created August 19, 2022 14:01
EBNF grammar for JSON
<quoted_string> ::= <quote> ( <unescaped_char> | <escaped_char> )+ <quote>
<escaped_char> ::= <escape> ( "\"" | "/" | "b" | "f" | "n" | "r" | "t" | <unicode> | <escape> )
<escaped_literal> ::= <escaped_char> | <escape> "`"
<unescaped_char> ::= <digit> | <letter> | " " | "!" | "#" | "$" | "%" | "&" | "'" | "(" | ")" | "*+" | "," | "-" | "." | "/" | ":" | ";" | "<" | ">" | "?" | "@" | "[" | "]" | "^" | "_" | "`" | "{" | "|" | "}" | "~"
<unescaped_literal> ::= <digit> | <letter> | " " | "!" | "#" | "$" | "%" | "&" | "'" | "(" | ")" | "*+" | "," | "-" | "." | "/" | ":" | ";" | "<" | ">" | "?" | "@" | "[" | "]" | "^" | "_" | "{" | "|" | "}" | "~"
<unicode> ::= "u" <digit> <digit> <digit> <digit>
<escape> ::= "\\"
@springcomp
springcomp / JMESPath.ebnf
Last active April 10, 2023 10:19
EBNF grammar for JMESPath
<expression> ::= <sub_expression>
| <index_expression>
| <comparator_expression>
| <list_filter_expression>
| <or_expression>
| <identifier>
| <and_expression>
| <not_expression>
| <paren_expression>
| <multi_select_list>
@springcomp
springcomp / README.md
Last active January 24, 2023 08:25
Azure API Management `foreach-` PowerShell scripts

Those scripts allow to perform an operation (a script block) to every item in Azure API Management. Supported scripts are:

  • foreach-api.ps1
  • foreach-api-operation.ps1
  • foreach-product.ps1

Those scripts call the following more general - albeit slightly more complex - script:

  • foreach-apim-object.ps1
@springcomp
springcomp / README.md
Last active January 19, 2023 13:14
Installing Docker and Kubernetes for WSL2 without Docker Desktop

Overview

This file outlines the steps taken to install and run Docker on Windows (WSL2) without Docker Desktop. To mimic the existing experience, those steps will guide you through creating a separate Linux distribution to host the Docker engine.

Download and install Linux distro from tarball

Distribution Location