Skip to content

Instantly share code, notes, and snippets.

@damienbutt
damienbutt / enable-pre-post-in-pnpm.md
Created October 3, 2023 19:54 — forked from dev-sampsonorson/enable-pre-post-in-pnpm.md
Enabling pre and post hooks in pnpm

Enabling pre and post hooks in pnpm

.npmrc option

enable-pre-post-scripts = true

Command line option

pnpm config set enable-pre-post-scripts true

@damienbutt
damienbutt / nerd_fonts.sh
Created March 26, 2023 01:59 — forked from davidteren/nerd_fonts.md
Install Nerd Fonts via Homebrew [updated & fixed]
# Nerd Fonts for your IDE
# https://www.nerdfonts.com/font-downloads
brew tap homebrew/cask-fonts && brew install --cask font-3270-nerd-font
brew tap homebrew/cask-fonts && brew install --cask font-fira-mono-nerd-font
brew tap homebrew/cask-fonts && brew install --cask font-inconsolata-go-nerd-font
brew tap homebrew/cask-fonts && brew install --cask font-inconsolata-lgc-nerd-font
brew tap homebrew/cask-fonts && brew install --cask font-inconsolata-nerd-font
brew tap homebrew/cask-fonts && brew install --cask font-monofur-nerd-font
brew tap homebrew/cask-fonts && brew install --cask font-overpass-nerd-font
class NetLinx::Parser
token IDENTIFIER
token DPS NUMBER DECIMAL STRING COMMENT
token CHAR WIDECHAR INTEGER SINTEGER LONG SLONG FLOAT DOUBLE DEV DEVCHAN
token IF ELSE IF ELSE SELECT ACTIVE SWITCH CASE FOR WHILE MEDIUM_WHILE LONG_WHILE BREAK DEFAULT RETURN
token DEFINE_CALL DEFINE_COMBINE DEFINE_CONNECT_LEVEL DEFINE_CONSTANT DEFINE_DEVICE DEFINE_EVENT DEFINE_FUNCTION DEFINE_LATCHING DEFINE_MODULE DEFINE_MUTUALLY_EXCLUSIVE DEFINE_PROGRAM DEFINE_START DEFINE_TOGGLING DEFINE_TYPE DEFINE_VARIABLE PROGRAM_NAME
token BUTTON_EVENT CHANNEL_EVENT DATA_EVENT LEVEL_EVENT REBUILD_EVENT
prechigh
@damienbutt
damienbutt / compute-sha-256-hash.ps1
Created January 20, 2023 13:24 — forked from WalternativE/compute-sha-256-hash.ps1
Powershell script that returns SHA-256 hash for a given string
Param (
[Parameter(Mandatory=$true)]
[string]
$ClearString
)
$hasher = [System.Security.Cryptography.HashAlgorithm]::Create('sha256')
$hash = $hasher.ComputeHash([System.Text.Encoding]::UTF8.GetBytes($ClearString))
$hashString = [System.BitConverter]::ToString($hash)
@damienbutt
damienbutt / PowershellAes.ps1
Created January 17, 2023 06:15 — forked from ctigeek/PowershellAes.ps1
Aes Encryption using powershell.
function Create-AesManagedObject($key, $IV) {
$aesManaged = New-Object "System.Security.Cryptography.AesManaged"
$aesManaged.Mode = [System.Security.Cryptography.CipherMode]::CBC
$aesManaged.Padding = [System.Security.Cryptography.PaddingMode]::Zeros
$aesManaged.BlockSize = 128
$aesManaged.KeySize = 256
if ($IV) {
if ($IV.getType().Name -eq "String") {
$aesManaged.IV = [System.Convert]::FromBase64String($IV)
}
@damienbutt
damienbutt / boot.txt
Created October 28, 2022 02:02 — forked from PeterCxy/boot.txt
U-BOOT boot.txt for booting RaspberryPi kernel on ArchLinxuARM aarch64
# After modifying, run ./mkscr
# Set root partition to the second partition of boot device
part uuid ${devtype} ${devnum}:2 uuid
setenv bootargs console=tty1 root=PARTUUID=${uuid} rw rootwait smsc95xx.macaddr="${usbethaddr}"
load ${devtype} ${devnum}:${bootpart} ${kernel_addr_r} /Image
load ${devtype} ${devnum}:${bootpart} ${ramdisk_addr_r} /initramfs-linux.img
booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdtcontroladdr};
@damienbutt
damienbutt / RaspberryPi4Archlinux64EncryptionUSBBootBtrfsGuide.md
Created October 20, 2022 13:33 — forked from XSystem252/RaspberryPi4Archlinux64EncryptionUSBBootBtrfsGuide.md
How To Set Up a Raspberry Pi 4 with Archlinux 64-bit (AArch64) and Full Disk Encryption (+SSH unlock), USB Boot (No SD-Card) and btrfs

How To Set Up a Raspberry Pi 4 with Archlinux 64-bit (AArch64) and Full Disk Encryption (+SSH unlock), USB Boot (No SD-Card) and btrfs

Written by: XSystem
First published on: 20 Dec 2020
Last updated on: 20 Dec 2020

[0] Introduction

Overview

@damienbutt
damienbutt / cheatsheet.md
Created October 5, 2022 23:56 — forked from masklinn/cheatsheet.md
launchctl/launchd cheat sheet

I've never had great understanding of launchctl but the deprecation of the old commands with launchctl 2 (10.10) has been terrible as all resources only cover the old commands, and documentation for Apple utilities is generally disgracefully bad, with launchctl not dissembling.

Mad props to https://babodee.wordpress.com/2016/04/09/launchctl-2-0-syntax/ which contains most details

domains

Internally, launchd has several domains, but launchctl 1 would only ask for service names,

Keybase proof

I hereby claim:

  • I am damienbutt on github.
  • I am damienbutt (https://keybase.io/damienbutt) on keybase.
  • I have a public key ASC5hysmvZ_58RSP4_Yoo54MuVVJWogfZtngxVQycfMRfAo

To claim this, I am signing this object:

@damienbutt
damienbutt / Setting-up-Semantic-Release.md
Created May 4, 2022 16:59 — forked from pedro-mass/Setting-up-Semantic-Release.md
Setting up semantic-release with commit linter and commit message helper