This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{/* | |
This template creates an x509 certificate given an x5c certificate issued by the Hosts CA. | |
Smallstep's step-ca reserves per-provisioner policies for their enterprise tier, so I'm implementing | |
the Permitted DNS Domain extension enforement in the template. | |
*/}} | |
{{ $permitted_domains := .AuthorizationCrt.PermittedDNSDomains }} | |
{{/* Combine the Subject Alt Name and Subject into one list so we can check everthing in one pass. */}} | |
{{ $requested_domains := concat (list (dict "Value" .Subject.CommonName "Type" "dns")) .SANs }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$TTL 300 | |
@ SOA localhost. root.localhost. 1731810420 43200 3600 86400 300 | |
NS localhost. | |
; | |
; Title: Luke's list | |
; License: MIT | |
; Expires: 1 day | |
; Last modified: 17 Nov 2024 23:22 UTC | |
; Version: 2024.1117.0227.57 | |
; Syntax: RPZ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* interpolate | |
* @description replaces substrings within a string template with values in a context dictionary | |
* @example interpolate("hello ${name}", { name: "Jerry" }) | |
* @param {string} template a template string | |
* @param {Record<string, string>} context | |
* @returns {string} | |
*/ | |
const interpolate = (template, context) => | |
template.replaceAll(/\${([a-z_$][a-z0-9_$]+?)}/gi, (raw, name) => |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# A modification of the standard Deno installation script (https://deno.land/install.sh) | |
# updated to support downloading a Linux arm64 binary from LukeChannings/deno-arm64 | |
# MIT licence. | |
set -e | |
if ! command -v unzip >/dev/null; then | |
echo "Error: unzip is required to install Deno (see: https://github.com/denoland/deno_install#unzip-is-required)." 1>&2 | |
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
### NZBGET SCAN SCRIPT | |
# Extract filenames from subjects containing [PRiVATE]-[WtFnZb] | |
# | |
# This extensions extracts obfuscated filenames from .nzb files | |
# created by WtFnZb. | |
# | |
# Supported subject formats: | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta name="viewport" content="width=device-width, initial-scale=1.0,viewport-fit=cover"> | |
<title>Viewport Height Test</title> | |
<style> | |
body { | |
font-family: -apple-system, 'Helvetica Neue', sans-serif; | |
margin: 0; | |
} | |
main { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// a .crumb file is a UTF-8 JSON document with the following schema: | |
interface CroutonRecipe { | |
name: string; | |
uuid: string; | |
serves: number; | |
// Preparation time in minutes | |
duration: number; | |
// Cooking time in minutes | |
cookingDuration: number; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" standalone="no"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" android:compileSdkVersion="29" android:compileSdkVersionCodename="10" android:installLocation="auto" package="com.plexapp.android" platformBuildVersionCode="29" platformBuildVersionName="10"> | |
<uses-permission android:name="com.android.vending.BILLING"/> | |
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/> | |
<uses-feature android:name="android.hardware.screen.landscape" android:required="false"/> | |
<uses-feature android:name="android.hardware.location" android:required="false"/> | |
<uses-feature android:name="android.hardware.location.gps" android:required="false"/> | |
<uses-feature android:name="android.hardware.location.network" android:required="false"/> | |
<uses-feature android:name="android.hardware.telephony" android:required="false"/> | |
<uses-feature android:name="android.hardware.microphone" android:required="false"/> | |
<uses-featu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { serve } from "https://deno.land/[email protected]/http/server.ts"; | |
import { walk } from "https://deno.land/[email protected]/fs/walk.ts"; | |
const PORT = 8001; | |
interface DenoInfo { | |
denoDir: string; | |
modulesCache: string; | |
typescriptCache: string; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const PROMETHEUS_ENDPOINT = 'prometheus.example.com' | |
const fetchMetric = async (query) => { | |
const url = `https://${PROMETHEUS_ENDPOINT}/api/v1/query?query=${encodeURIComponent(query)}` | |
const req = new Request(url) | |
return req.loadJSON() | |
} | |
const getPVCAvailability = (pvc) => { | |
return fetchMetric(`kubelet_volume_stats_available_bytes{persistentvolumeclaim="${pvc}"}`) |
NewerOlder