Skip to content

Instantly share code, notes, and snippets.

View roelds's full-sized avatar
:shipit:
(╯°□°)╯︵ ┻━┻

RoelDS roelds

:shipit:
(╯°□°)╯︵ ┻━┻
  • 13:44 (UTC -05:00)
View GitHub Profile
@roelds
roelds / build_brotli_win.md
Created January 5, 2023 00:30
HowTo Build Brotli Windows
@alexander-hanel
alexander-hanel / byte2uuid.py
Last active September 7, 2023 18:46
Converts 16 bytes to a UUID using Microsoft's Variant 2 format.
import ctypes
class BYTE2UUID(ctypes.Structure):
"""
Variant 2 UUIDs
https://en.wikipedia.org/wiki/Universally_unique_identifier#Encoding
"""
_fields_ = [
("time_low", ctypes.c_uint), ("time_mid", ctypes.c_ushort), ("time_hi_and_version", ctypes.c_ushort),
("clock_seq_hi_and_res", ctypes.c_char * 2), ("node", ctypes.c_char * 6)
@arvati
arvati / .wsl-git.md
Created May 21, 2023 23:44 — forked from carlolars/.wsl-git.md
HOWTO: Use WSL and its Git in a mixed development environment

How to setup a development environment where Git from WSL integrates with native Windows applications, using the Windows home folder as the WSL home and using Git from WSL for all tools.

Note if using Git for Windows, or any tool on the Windows side that does not use Git from WSL then there will likely be problems with file permissions if using those files from inside WSL.

Tools

These are the tools I use:

  • git (wsl) - Command line git from within WSL.
  • Fork (windows) - Git GUI (must be used with wslgit)
  • wslgit - Makes git from WSL available for Windows applications. Important! Follow the installation instructions and do (at least) the first optional step and then the Usage in Fork instructions.
@alexander-hanel
alexander-hanel / README.md
Last active September 7, 2023 18:46
Distraction Free Slack

Prevent distractions within slack by making the sidebar black.

Slack > Settings > Themes > Create a Custom Theme > "Copy and paste these values to share your custom theme with others" 

Cut and paste the following values

#000000,#000000,#000000,#000000,#000000,#000000,#000000,#000000,#000000,#000000
@arvati
arvati / alpine.md
Last active August 2, 2024 06:55
Install Alpine Linux on sdcard

Mount Destination partition on sdcard

lsblk -f
sudo fdisk /dev/sda
sudo mkfs -t ext4 /dev/sda1
sudo mount -t auto /dev/sda1 /mnt
cd /mnt
sudo su

mkdir -p ./etc/apk
@roelds
roelds / compile_gnupg.sh
Last active December 19, 2024 11:14
Compile gnupg 2.4.x from Source for Debian Testing
# assumes new Debian Testing VM, for purpose of compiling, running below as root
# uses most libs already available from apt, only compiles lib ntbtls
lsb_release -a
uname -a
wget https://gnupg.org/signature_key.asc
gpg --import signature_key.asc
gpg -k
wget https://www.gnupg.org/signature_key.html
@imranouadid
imranouadid / install_fonts.sh
Created September 8, 2023 02:31 — forked from iacchus/install_fonts.sh
Install all Google Fonts on Linux (Debian/Ubuntu etc.)
#!/usr/bin/env sh
# Original author: Michalis Georgiou <[email protected]>
# Modified by Andrew http://www.webupd8.org <[email protected]>
# Current version by Kassius Iacchus https://github.com/iacchus/
# Depends on: `wget`
#
# Install `wget` on Debian/Ubuntu with:
# apt install wget
@roelds
roelds / asn.sh
Last active September 9, 2023 02:47 — forked from ethack/asn
ASN/IP/Route/hostname CLI lookup tool to map any network to corresponding ASN & prefix
#!/bin/bash
if command -v whois >/dev/null 2>&1 ; then echo "whois ok..." ; else echo "install whois!" && exit ; fi
# verified on latest Ubuntu server cloudimg
############################################################################################################
# ----------------------------------------------------------------------
# ASN/IPv4/Prefix lookup tool. Uses Team Cymru's whois service for data.
# ----------------------------------------------------------------------
# example usage:
# asn <ASnumber> -- to lookup matching ASN data. Supports "as123" and "123" formats (case insensitive)
@roelds
roelds / ListPrivilegedServices.ps1
Last active September 8, 2023 23:39 — forked from RomelSan/ListPrivilegedServices.ps1
List privileged services that don't come with Windows 11
# updated for Win11
# List privileged services that don't come with Windows 11
# Exclusion List for Win11 built in
$exclusion = @('ALG', 'AppVClient', 'COMSysApp', 'diagnosticshub.standardcollector.service',
'edgeupdate', 'edgeupdatem', 'gcs', 'MicrosoftEdgeElevationService', 'MSDTC',
'msiserver', 'NetTcpPortSharing', 'perceptionsimulation', 'PerfHost', 'RpcLocator', 'SecurityHealthService',
'Sense', 'SensorDataService', 'SgrmBroker', 'SNMPTrap', 'spectrum', 'Spooler', 'sppsvc', 'TieringEngineService',
'TrustedInstaller', 'UevAgentService', 'uhssvc', 'vds', 'VSS', 'wbengine', 'WdNisSvc', 'WinDefend', 'wmiApSrv',
'WMPNetworkSvc', 'WSearch', 'WslService')
@roelds
roelds / _openssl_keys
Last active September 9, 2023 23:52
Use openssl with ed448 keys, to sign & verify shake256 digests
# will prompt for passphrase on stdin
openssl genpkey -out skey.pem -verbose -pass stdin -aes-256-cbc -algorithm ed448
openssl ec -in skey.pem -pubout -out pub.pem
# create hash
openssl shake256 -xoflen 64 -out dgst thefile
openssl pkeyutl -sign -inkey skey.pem -rawin -in dgst -out dgst.sig
openssl pkeyutl -verify -rawin -inkey pub.pem -pubin -sigfile dgst.sig -in dgst