Skip to content

Instantly share code, notes, and snippets.

@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"; }
@sinofool
sinofool / install_unifi_8_debian_12.txt
Last active June 7, 2024 21:53
Install Unifi Controller on Debian 11 (Bullseye)
# libssl1.1, the only missing mongodb dependency.
# I prefer enable oldstable in case this get backport security patches
echo "deb http://deb.debian.org/debian bullseye main" | sudo tee /etc/apt/sources.list.d/oldstable-bullseye.list
# MongoDB 4.4, [end of life Feb 2024](https://www.mongodb.com/support-policy/lifecycles)
curl -fsSL https://pgp.mongodb.com/server-4.4.asc | sudo gpg -o /usr/share/keyrings/mongodb-server-4.4.gpg --dearmor
echo "deb [ signed-by=/usr/share/keyrings/mongodb-server-4.4.gpg ] http://repo.mongodb.org/apt/debian buster/mongodb-org/4.4 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
sudo apt-get update && sudo apt-get install mongodb-org-server -y
# Unifi
@JulyIghor
JulyIghor / firetv_firmware.md
Last active April 21, 2025 07:10
Amazon Fire TV Stick 4K Firmware and apps. Official Cloud Front direct links only
@FrenchBen
FrenchBen / adb-firetv-cmd.sh
Created July 15, 2021 01:02
List of commands available for ADB against FireTV smart TV
# Connect to TV
adb connect <TV_IP>
# verify devices
adb devices
# list installed packages
adb shell pm list packages -f -3
# list all packages
adb shell pm list packages -f
@GetVladimir
GetVladimir / Force-RGB-Color-on-M1-Mac.md
Last active April 25, 2025 07:39
Force RGB Color on M1 Mac

Force RGB Color on M1 Mac

How to Force RGB Color Output instead of YPbPr on your M1 Apple Silicon Mac for an External Monitor.

This step-by-step video tutorial will guide you through the procedure of forcing RGB color output on your M1 Mac.

Force RGB Color on M1 Mac

Here is the direct link to the video tutorial: https://www.youtube.com/watch?v=Z1EqH3fd0V4

The video also has Closed Captions (Subtitles) that you can enable, to make it easier to follow if needed.

@felixgren
felixgren / guide.md
Last active September 3, 2024 19:39
Creating bootable Windows 10 Enterprise USB with custom drivers or packages (CAB)

Downloading Windows 10 Enterprise

Download Windows Media Creation Tool

Open Powershell and use it to launch the tool with these options. You can either use a relative or absolute path for the exe file. An easy way to get the path of a file is to hold in shift and right click, then select "Copy as path" in File Explorer.

# Make sure to change the language code to your liking, I have selected en-US. If you are on 32-bit you can use x84.
C:\Users\Felix\Downloads\MediaCreationTool_22H2.exe /Eula Accept /Retail /MediaLangCode en-US /MediaArch x64 /MediaEdition Enterprise

Select the "Create USB" option if you want a stock Windows 10 Enterprise USB installer. Select the ISO option if you want to create a customized ISO & installer with preinstalled drivers using a CAB package.

@iximiuz
iximiuz / net_lab_simple_vlan.sh
Last active November 20, 2022 23:33
Configure VLAN tagging on a Linux bridge.
#!/usr/bin/env bash
set -euo pipefail
create_bridge() {
local nsname="$1"
local ifname="$2"
echo "Creating bridge ${nsname}/${ifname}"
@phhusson
phhusson / AppsOverADB.kt
Created February 2, 2021 21:33
Remote control apps running on a smartphone
/*
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
@darrenpmeyer
darrenpmeyer / decrypt-howto.md
Created December 23, 2020 02:36
Decrypt Unifi .unf backups

NB: these instructions are for Ubuntu; they work under WSL on Windows 10 as well

Get the decrypt.sh file from here: https://github.com/zhangyoufu/unifi-backup-decrypt

Make sure prerequisites are installed:

sudo apt update && sudo apt install zip unzip openssl mongo-tools
@MineRobber9000
MineRobber9000 / donotuse3.py
Last active February 8, 2024 12:48
How to NEVER use lambdas - Python 3 edition
###########################################################
# How to NEVER use lambdas. An inneficient and yet educa- #
# tonal [sic] guide to the proper misuse of the lambda #
# construct in Python 3.x. [DO NOT USE ANY OF THIS EVER] #
# original by (and apologies to): e000 (13/6/11) #
# now in Python 3 courtesy of: khuxkm (17/9/20) #
###########################################################
## Part 1. Basic LAMBDA Introduction ##
# If you're reading this, you've probably already read e000's