Skip to content

Instantly share code, notes, and snippets.

@AveYo
AveYo / .. MediaCreationTool.bat ..md
Last active July 15, 2025 00:55
Universal MediaCreationTool wrapper for all MCT Windows 10 versions - MOVED TO github.com/AveYo/MediaCreationTool.bat
@parsa
parsa / ssh-key-to-fingerprint.md
Last active July 18, 2023 05:26
Generate MD5 and SHA256 fingerprint of an OpenSSH host

Generate MD5 and SHA256 fingerprint of an OpenSSH host

MD5

# ssh-keyscan -p 8000 -t rsa rostam.cct.lsu.edu 2>/dev/null | awk '{ print $3 }' | base64 -d | md5sum | awk '{ print $1 }' | fold -w2 | paste -sd':' -
71:5a:1d:bb:1f:1e:fa:e6:34:98:3d:48:f5:ce:9d:68
# ssh-keygen -l -E md5 -f <(ssh-keyscan -p 8000 -t rsa rostam.cct.lsu.edu 2>/dev/null)
2048 MD5:71:5a:1d:bb:1f:1e:fa:e6:34:98:3d:48:f5:ce:9d:68 [rostam.cct.lsu.edu]:8000 (RSA)
@menushka
menushka / downloadiOSHeaders.py
Last active September 17, 2024 18:14
Download iOS Headers from http://developer.limneos.net. Includes settings for iOS version, download path and only downloading select frameworks.
from lxml import html
import requests
import re
import os
def createDir(path):
if not os.path.exists(path): os.makedirs(path)
# Settings
iosVersion = "12.1"
@htr3n
htr3n / macos-ramdisk.md
Last active July 7, 2025 13:29
Creating RAM disk in macOS

Built-in

diskutil erasevolume HFS+ 'RAM Disk' `hdiutil attach -nobrowse -nomount ram://XXXXX`

where XXXXX is the size of the RAM disk in terms of memory blocks.

Notes:

@shanewholloway
shanewholloway / export-yubi-to-ssh-key.sh
Created December 4, 2019 00:07
Export a Yubikey certificate to an ssh-keygen compatible key.
#!/bin/sh
# Seems to only support RSA keys...
ykman piv export-certificate 9a public-cert.pem
openssl x509 -in public-cert.pem -noout -pubkey > public-key.pem
ssh-keygen -i -m pkcs8 -f ./public-key.pem > id_yubi_9a.pub
@vadim-kovalyov
vadim-kovalyov / bootstrap-ubuntu.sh
Last active August 22, 2024 20:50
Dev box setup for Ubuntu 20.04
sudo apt update
sudo apt install -y build-essential curl make git vim hub libssl-dev graphviz jq cmake clang pkg-config p7zip terminator gnome-tweaks fonts-firacode protobuf-compiler
# intune
sudo apt install libpam-pwquality
sudo nano /etc/pam.d/common-password
# password requisite pam_pwquality.so retry=3 dcredit=-1 ocredit=-1 ucredit=-1 lcredit=-1 minlen=12
curl -sSl https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
@declon
declon / domain-join.sh
Last active September 1, 2023 03:11
AWS - Ubuntu 18.04 - Join Self Hosted Active Directory
DOMAIN_USR=domainjoinusername
DOMAIN_PWD=domainjoinpassword
# get instance ID
ID=$(curl http://169.254.169.254/latest/meta-data/instance-id)
# install deps
DEBIAN_FRONTEND=noninteractive apt-get -y install sssd heimdal-clients msktutil
# set hostname
@startergo
startergo / How to Download Full MacOS Installers
Last active March 29, 2025 16:23
How to Download Full MacOS Installer from Mac Command Line
// Mac OS Big Sur 11.2.3:
http://swcdn.apple.com/content/downloads/12/32/071-14766-A_Q2H6ELXGVG/zx8saim8tei7fezrmvu4vuab80m0e8a5ll/InstallAssistant.pkg
// Mac OS Catalina 10.15:
https://itunes.apple.com/us/app/macos-catalina/id1466841314?ls=1&mt=12
// Mac OS Mojave 10.14:
https://itunes.apple.com/us/app/macos-mojave/id1398502828?ls=1&mt=12
// Mac OS High Sierra 10.13:
@synthetic-intelligence
synthetic-intelligence / More Helpful Commands
Last active April 13, 2025 13:06
Smart Card Config MacOS
# MacOS smartcard
List tokens available in the system
pluginkit -m -p com.apple.ctk-tokens
ex: com.apple.CryptoTokenKit.setoken(1.0)
com.apple.CryptoTokenKit.pivtoken(1.0)
@sm-Fifteen
sm-Fifteen / whats_a_yubikey.md
Last active July 2, 2025 17:01
"What the heck is a Yubikey and why did I buy one?": A user guide

"What the heck is a Yubikey and why did I buy one?": A user guide

(EDIT: Besides Reddit, I've also put this up on Github Gist)

So while looking for information on security keys before getting one myself, I got very confused reading about all the different modes and advertised features of Yubikeys and other similar dongles. The official documentation tends to be surprisingly convoluted at times, weirdly organized and oddly shy about a few of the limitations of these keys (which I'm making a point of putting front and center). Now that I have one, I decided to write down everything I figured out in order to help myself (and hopefully some other people reading this) make sense of all this.

Since I'm partly writing these notes for myself, there might be some back and forth between "exp