Skip to content

Instantly share code, notes, and snippets.

View deas's full-sized avatar

Andreas Steffan deas

View GitHub Profile
#!/bin/sh
depth=$1
jq 'def scrub(n):
if type == "object" then
if n == 0 then empty
else map_values(scrub(n - 1)) | with_entries(select(.value != null))
end
elif type == "array" then
if n == 0 then empty
else map(scrub(n - 1))
#!/bin/bash
set -euo pipefail
# hades-git-clone - Git clone wrapper for FQDN rewriting and username injection
# Configuration
SOURCE_FQDN="github.com"
TARGET_FQDN="internal.github.com"
# Append or remove a path entry to default powershell profile
# Update-Path -TargetFolder "C:\Program Files\Git\usr\bin" -Action Add
# Update-Path -TargetFolder "C:\Program Files\Git\usr\bin" -Action Remove
function Update-Path {
param (
[Parameter(Mandatory=$true)]
[string]$TargetFolder,
[ValidateSet("Add", "Remove")]
[string]$Action = "Add"
#!/bin/bash
set -euo pipefail
# Check for root privileges
if [[ $EUID -ne 0 ]]; then
echo "Error: This script must be run as root" >&2
exit 1
fi
#!/bin/bash
set -euo pipefail
# Check for root privileges
if [[ $EUID -ne 0 ]]; then
echo "Error: This script must be run as root" >&2
exit 1
fi
# Define the Font Face
$fontName = "JetBrainsMono NF"
# Locate Windows Terminal settings.json (Standard vs Preview paths)
$settingsPath = "$env:LOCALAPPDATA\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json"
if (-not (Test-Path $settingsPath)) {
$settingsPath = "$env:LOCALAPPDATA\Microsoft\Windows Terminal\settings.json"
}
if (Test-Path $settingsPath) {
# Script to install a Nerd Font for the current user (Non-Admin)
# Usage: ./install_nerd_font.ps1 [[-FontName] <String>] [[-Version] <String>] [-Force]
# Example: ./install_nerd_font.ps1 -FontName "FiraCode"
# Example: irm https://example.com/install_nerd_font.ps1 | iex
#
param (
[Parameter(Mandatory=$false)]
[string]$FontName = "JetBrainsMono",

Keybase proof

I hereby claim:

  • I am deas on github.
  • I am asteffan (https://keybase.io/asteffan) on keybase.
  • I have a public key whose fingerprint is CEDB 1150 3AFA 6FA2 79DA 9B43 AFA9 84BE D99B 1DF7

To claim this, I am signing this object:

@deas
deas / meta1.cljg
Created November 20, 2019 13:55
unittest-meta1
;; gorilla-repl.fileformat = 2
;; @@ [meta]
{:test 789}
;; @@
;; gorilla-repl.fileformat = 1
;; **
;;; # Render tests
;;;
;;; Some test cases for the new renderer.
;; **
;; @@
(use '[gorilla-repl table latex html])