Skip to content

Instantly share code, notes, and snippets.

@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 / 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 [email protected]
@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 / 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 / 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 / WinImage-KeyGen.html
Created July 28, 2019 15:22 — forked from steelywing/WinImage-KeyGen.html
winimage 9.0 keygen
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>WinImage 9.0 KeyGen</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body style="text-align: center;">
<h1>WinImage 9.0 KeyGen</h1>
#!/usr/bin/ruby -w
=begin
* gtf.rb Copyright (c) 2008, Paul Lutus
* Released under the GPL
* This Ruby program is largely based on:
* -------------------------------------------------------------
* gtf.c Generate mode timings using the GTF Timing Standard
*
@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"