Skip to content

Instantly share code, notes, and snippets.

View dwalleck's full-sized avatar

Daryl Walleck dwalleck

View GitHub Profile
@1player
1player / bazarr.docker-compose.yml
Last active February 17, 2024 20:41
Poor man's media centre
# Bazarr downloads subtitles
version: "3.4"
services:
bazarr:
image: linuxserver/bazarr:1.0.5-development
container_name: bazarr
restart: unless-stopped
environment:
- TZ=Europe/London
@davidfowl
davidfowl / MinimalAPIs.md
Last active May 18, 2024 18:28
Minimal APIs at a glance

The issue

When a fixture is not used but needs to be included for some reasons, pylint will rightfully issue a warning. For instance, a fixture setup a specific database state and another fixture include it to ensure database is in a specific state.

@pytest.fixture
def init_database():
    """Setup database state"""
    ...
@machuu
machuu / WSL2_VPN_Workaround_Instructions.md
Last active May 23, 2024 05:39
Workaround for WSL2 network broken on VPN

Overview

Internet connection and DNS routing are broken from WSL2 instances, when some VPNs are active.

The root cause seems to be that WSL2 and the VPN use the same IP address block, and the VPN routing clobbers WSL2's network routing.

This problem is tracked in multiple microsoft/WSL issues including, but not limited to:

@bradygaster
bradygaster / api.cs
Last active June 25, 2021 01:24
An OpenAPI-enabled HTTP API in .NET 5, in two files, using top-level statements programming style
using System;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Carter;
using Carter.Response;
using Carter.OpenApi;
@smiller171
smiller171 / database.tf
Last active October 3, 2023 16:49
Manage RDS password in Terraform in a sane way
resource "random_password" "db_master_pass" {
length = 40
special = true
min_special = 5
override_special = "!#$%^&*()-_=+[]{}<>:?"
keepers = {
pass_version = 1
}
}
@jchannon
jchannon / instructions.md
Last active March 31, 2021 18:13
Install .NET Core Side By Side on Linux

dotnet-install

Add the below alias to be used in your terminal

alias dni='curl https://dotnet.microsoft.com/download/dotnet-core/scripts/v1/dotnet-install.sh -o ~/.dotnet/dotnet-install.sh -s | chmod +x ~/.dotnet/dotnet-install.sh | ~/.dotnet/dotnet-install.sh'

Execute the below command to see possible options

dni --help

@richlander
richlander / instructions.md
Last active March 24, 2024 14:54
Installing .NET Core 3.0 on Linux ARM64

Installing .NET Core on Linux ARM64

The following intructions can be used to install .NET Core on Linux ARM64.

Pro tip: Check out .NET Core Docker files to determine the exact instructions for installing .NET Core builds, for example .NET Core 3.1 ARM32 SDK Dockerfile.

Installing .NET Core Globally

The following instructions install the latest .NET Core globally. It isn't required to do that, but it provides the best experience.

PostgreSQL Type PostgreSQL Size Description Range Diesel Type Rust Type
Nullable Types nullable Nullable``
@katylava
katylava / importS3Csv.gs
Last active August 7, 2023 14:37
Google Apps Script to import a CSV, stored securely on S3, to a Google Spreadsheet
var AWS_KEY = '<your key>';
var AWS_SECRET = '<your secret>';
function generateS3Url(bucket, path) {
var expiresDt = Math.floor(Date.now() / 1000) + (60 * 60 * 24); // can be up to 7 days from now
var stringToSign = 'GET\n\n\n' + expiresDt + '\n/' + bucket + '/' + encodeURIComponent(path);
var hmac = Utilities.computeHmacSignature(Utilities.MacAlgorithm.HMAC_SHA_1, stringToSign, AWS_SECRET, Utilities.Charset.UTF_8);
var signed = encodeURIComponent(Utilities.base64Encode(hmac));