Skip to content

Instantly share code, notes, and snippets.

@JonnyTech
JonnyTech / git.txt
Last active August 20, 2023 01:05
git guide
ssh-keygen -t ed25519 -C "name[at]domain[dot]tld"
>> keyfile ie /home/user/.ssh/github
>> passphrase and confirm
https://github.com/settings/ssh/new
cat /home/user/.ssh/github
>> authentication key
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/github
ssh -vT git@github.com
@JonnyTech
JonnyTech / mkwinusb.sh
Last active August 13, 2023 20:29
Create bootable Windows installer drive from Linux
#!/bin/bash
die(){
echo -e "\n$1"
echo -e "\nUsage: $0 /path/to/windows.iso /path/to/usb [gpt|mbr] [full|quick]\n"
exit
}
[ "$(id -u)" != "0" ] && die "You must be root to run this script"
[ -f "$1" ] && iso="$1" || die "Error: File $1 does not exist"
[ -e "$2" ] && usb="$2" || die "Error: Drive $2 not present"
[[ ${3,,} = "mbr" ]] && { mode=1; echo "Mode: MBR"; } || { mode=0; echo "Mode: GPT"; }
@JonnyTech
JonnyTech / readme.md
Last active July 7, 2023 10:59
MacOS VLANs

Linux:

vconfig add en0 3
ip addr add 192.168.126.5/24 dev en0.3
ip link set up en0.3

macOS:

ifconfig vlan0 create
@JonnyTech
JonnyTech / ffmpeg-hap-readme.md
Last active May 6, 2023 08:45 — forked from dlublin/ffmpeg-hap-readme.md
Encoding to Hap from the command line using FFmpeg

Encoding to Hap from the command line using FFmpeg

For users who prefer working with a command line or need to access advanced encoding settings for Hap the popular FFmpeg library can be used to work with Hap movies.

  1. If this is your first time using FFmpeg you may need to install it on your system, or compile it from source. In either case be sure that Snappy is enabled as part of the binary. If you already have FFmpeg on your system with Snappy enabled, you can skip this step.

    You can check that your version of FFmpeg can encode Hap using

    ffmpeg -encoders | grep hap
    
@JonnyTech
JonnyTech / image.txt
Last active May 6, 2023 08:44
wds image
sysprep /generalize /oobe /shutdown /unattend:unattend.xml
https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/capture-images-of-hard-disk-partitions-using-dism
dism /Capture-Image /ImageFile:filename.wim /CaptureDir:C:\ /Name:"Image name"
@JonnyTech
JonnyTech / convert-retail-to-volume-2019.cmd
Created June 6, 2022 10:49 — forked from mokocup/convert-retail-to-volume-2019.cmd
Convert Office 2019 Retail To Volume
REM Change 192.168.1.7 to KMS Server IP or Host
REM Change ProgramFiles to ProgramFiles(x86) If install x86 version . Default are x64
@echo off
Title Converter Office 2019 Retail to Volume And Active Through Server
set LICPATH=%ProgramFiles%\Microsoft Office\root\Licenses16
set LICPATH1=%ProgramFiles%\Microsoft Office\Office16
cscript slmgr.vbs /ilc "%LICPATH%\ProPlusVL_KMS_Client-ppd.xrm-ms"
cscript slmgr.vbs /ilc "%LICPATH%\ProPlusVL_KMS_Client-ul.xrm-ms"
@JonnyTech
JonnyTech / mkmacosusb.sh
Last active April 25, 2022 00:07
Create bootable macOS installer drive
#!/bin/bash
# url: https://github.com/notthebee/macos_usb
git clone "https://github.com/corpnewt/gibMacOS"
./gibMacOS/gibMacOS.command -v 11
mv gibMacOS/macOS\ Downloads/publicrelease/*/*.pkg .
7z e -txar InstallAssistant.pkg SharedSupport.dmg
7z e SharedSupport.dmg 4.* 5.*
mv 4.* 4.hfs
@JonnyTech
JonnyTech / java_download.sh
Created February 16, 2022 20:01 — forked from wavezhang/java_download.sh
download java from oracle without login
wget -c --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/12.0.2+10/e482c34c86bd4bf8b56c0b35558996b9/jdk-12.0.2_linux-x64_bin.tar.gz
@JonnyTech
JonnyTech / mkwinimg.sh
Last active January 22, 2022 19:50
Create bootable Windows installer (virtual) drive image from Linux
#!/bin/bash
die(){
echo -e "\n$1"
echo -e "\nUsage: $0 /path/to/windows.iso /path/to/output.img [gpt|mbr]\n"
exit
}
[ "$(id -u)" != "0" ] && die "You must be root to run this script"
[ -f "$1" ] && iso="$1" || die "Error: $1 does not exist"
[ ! -f "$2" ] && img="$2" || die "Error: $2 already exists"
[[ ${3,,} = "mbr" ]] && { mode=1; echo "Mode: MBR"; } || { mode=0; echo "Mode: GPT"; }
@JonnyTech
JonnyTech / Windows 10 Decrapifier, version 2.ps1
Created April 24, 2018 12:58
Windows 10 Decrapifier 2.0: ULTRA-DECRAPIFIER - By CSAND - March 16 2018 - https://community.spiceworks.com/scripts/show/3298-windows-10-decrapifier-v2
#Windows 10 Decrapifier 2.0: ULTRA-DECRAPIFIER
#By CSAND
#March 16 2018
#
#
#OFFICIAL DOWNLOAD:
#https://community.spiceworks.com/scripts/show/3298-windows-10-decrapifier-v2
#
#
#Join the Spiceworks Decrapifier community group on Spiceworks to get help or make suggestions!