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
@Neurognostic
Neurognostic / create-uefi-unified-image.sh
Last active June 18, 2023 09:29
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
@davidwallis3101
davidwallis3101 / Test-Unattend.ps1
Last active April 5, 2024 23:26
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 March 21, 2024 22:12
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 May 10, 2024 06:17
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 (

@bossen
bossen / skiptofade.lua
Last active May 8, 2022 01:29
mpv lua script. Seeks forward until a black screen appears. Built to skip openings. Uses the lavfi blackdetect filter.
-- betterchapters.lua
-- seeks forward until a black screen appears.
-- default keybinding: b
-- Keybind names: skip_scene
script_name = mp.get_script_name()
detect_label = string.format("%s-detect", script_name)
detecting = false
threshold = 0.9
detection_span = 0.05
negation = false
@eatnumber1
eatnumber1 / renameat2.c
Last active May 12, 2024 17:45
Command-line tool to call renameat2(2)
/*
* Copyright (c) 2023 Russell Harmon
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*