Skip to content

Instantly share code, notes, and snippets.

@gonzalc
gonzalc / logon.ps1
Last active December 11, 2023 11:58
Run PowerShell script without displaying a window
$ErrorActionPreference = 'SilentlyContinue'
$fs = 'fileserver'
$drive = @{
'Personal' = '\\{0}\{1}' -f $fs, $env:USERNAME
'Training' = '\\{0}\Training' -f $fs
'Transfer' = '\\{0}\Transfer' -f $fs
}
New-PSDrive -Name 'P' -PSProvider FileSystem -Root $drive.Personal -Description 'Personal Files' -Persist
New-PSDrive -Name 'T' -PSProvider FileSystem -Root $drive.Training -Description 'Training Files' -Persist
@sergeiwaigant
sergeiwaigant / url_encode_string_with_linux_tools.md
Last active January 9, 2026 21:10
Simply URL encode string with Linux/Bash/Shell tools

Reference https://stackoverflow.com/a/34407620/13287790

$ printf %s 'encode this'|jq -sRr @uri
encode%20this

$ jq -rn --arg x 'encode this' '$x|@uri'
encode%20this

# -r (--raw-output) outputs the raw contents of strings instead of JSON string literals. -n (--null-input) doesn't read input from STDIN.
@Neurognostic
Neurognostic / create-uefi-unified-image.sh
Last active August 20, 2025 14:03
Dracut UEFI Unified Kernel Image with Secure Boot Signing
esp=/efi
distro=archlinux
mkdir -p $esp/EFI/$distro
# Generate UEFI Unified Image
dracut --force --verbose --kver $(uname -r) $esp/EFI/$distro/linux+initramfs.efi.signed
# Create UEFI boot manager entry
efibootmgr --quiet --create --disk /dev/disk/by-label/EFI --label 'Arch Linux' --loader /EFI/$distro/linux+initramfs.efi.signed
@davidwallis
davidwallis / Test-Unattend.ps1
Last active January 3, 2026 02:04
Validate Unattend.xml or AutoUnattend.xml meet the schema
<#
.SYNOPSIS
Test-Unattend.ps1
.DESCRIPTION
Test-Unattend.ps1
.NOTES
For additonal information please contact david.wallis@transunion.co.uk
# Maintainer: oliver < a t > first . in-berlin . de
# Contributor: charlesthehawk at yahoo dot com
# Contributor: Serge Zirukin <ftrvxmtrx@gmail.com>
pkgname=ocaml-sqlite3
_pkgname=sqlite3-ocaml
pkgver=4.4.0
pkgrel=2
pkgdesc="SQLite3 bindings for OCaml"
arch=('i686' 'x86_64')
@thaJeztah
thaJeztah / a-do-a-run-run-a-do-a-run.md
Last active March 5, 2024 14:32
Silly experiments with `RUN --mount`

Silly experiments with RUN --mount

relates to moby/moby#32507, moby/buildkit#442

Doing some silly experimenting with RUN --mount:

# syntax=docker/dockerfile:1

FROM alpine AS stage1
@krishpop
krishpop / export-toby.js
Last active June 6, 2025 13:26
Export Toby
// code courtesy of Toby team
chrome.storage.local.get("state", o => (
((f, t) => {
let e = document.createElement("a");
e.setAttribute("href", `data:text/plain;charset=utf-8,${encodeURIComponent(t)}`);
e.setAttribute("download", f);
e.click();
})(`TobyBackup${Date.now()}.json`, o.state)
));
@Ircama
Ircama / Digispark.md
Last active December 20, 2025 19:59
Configuring the Digispark ATtiny85 board for Arduino IDE and upgrading the bootloader

Configuring the Digispark ATTINY85 board for Arduino IDE and upgrading the bootloader

Warning: this document has to be updated by pointing to https://github.com/SpenceKonde/ATTinyCore

This note describes the configuration of an ATtiny85 based microcontroller development board named Digispark and similar to the Arduino line. It is available in many online marketplaces for roughly 1 dollar (e.g., Ebay, Amazon, AliExpress) and is shipped fully assembled, including a V-USB interface (a software-only implementation of a low-speed USB device for Atmel's AVR microcontrollers). Coding is similar to Arduino: it uses the familiar Arduino IDE and is already provided with a ready-to-use bootloader (

anonymous
anonymous / PatchExtract125.ps1
Created November 14, 2016 16:52
Patch Extract v1.25 by Greg Linares (@Laughing_Mantis)
<#
================
PATCHEXTRACT.PS1
=================
Version 1.25 Microsoft MSU Patch Extraction and Patch Organization Utility by Greg Linares (@Laughing_Mantis)
This Powershell script will extract a Microsoft MSU update file and then organize the output of extracted files and folders.
Organization of the output files is based on the patch's files and will organize them based on their archicture (x86, x64, or wow64)
as well as their content-type, ie: resource and catalog files will be moved to a JUNK subfolder and patch binaries and index files will