Skip to content

Instantly share code, notes, and snippets.

@gladiopeace
gladiopeace / proxmox-import-disk-image.txt
Created February 4, 2023 17:20 — forked from swuecho/proxmox-import-disk-image.txt
Add import existing disk image into Proxmox
#
# The official PVE docs on how to prepare cloud-init templates:
# https://pve.proxmox.com/wiki/Cloud-Init_Support#_preparing_cloud_init_templates
#
# Additional guides and resources:
# https://dae.me/blog/2340/how-to-add-an-existing-virtual-disk-to-proxmox/
# https://pve.proxmox.com/pve-docs/qm.1.html
# use the Qemu/KVM Virtual Machine Manager to import the disk
qm importdisk 107 Univention-App-kopano-core-KVM.qcow2 local-lvm
@gladiopeace
gladiopeace / nvidia_drivers_ubuntu.txt
Created January 29, 2023 14:42 — forked from gallg/nvidia_drivers_ubuntu.txt
install nvidia drivers for optimus GPU (Ubuntu)
# Nvidia drivers for optimus GPU;
How to install Nvidia drivers and configure bumblebee on Ubuntu 16.04 with optimus GPU.
It doesn't work with Ubuntu 18+ (I recommend manual switch between GPU in this case).
Tested on Ubuntu 16.04 with Geforce GT 750m and Intel HD graphic
_______________________________________________________________________________________________________________
- Step 1: remove all video drivers;
sudo apt-get remove --purge nvidia* bumblebee* xserver-xorg-video-nouveau
@gladiopeace
gladiopeace / nfs_automount.sh
Created January 29, 2023 06:49 — forked from aldur/nfs_automount.sh
Mount an NFS share on Android
#!/bin/sh
# Mount an NFS share on Android
# Requirements:
# - Busybox
# - A kernel supporting nfs (either built-in or as a module)
# On my Nexus 7 2012 I use the following kernel:
# http://forum.xda-developers.com/showthread.php?t=2107224
# Remember: if you have problems of system space, simply delete some of the default stuff.

Abstract

This is a full guide for people who wanted to setup Windows 10/11 VM with QEMU/KVM hypervisor for laptops that configured with hybrid graphics card like Intel/AMD + NVIDIA. This process will take about 1 to 2 hours, depending on your system's performance.

Before we proceed:

  • This guide is exclusively for Fedora because this distro is quite different to set up than other distro such as Arch. I would say Arch is easier to setup than Fedora, but sometimes your prefer Fedora than Arch in terms of its usage & features.
  • This tutorial mostly focus on laptops with NVIDIA Optimus MUXed configuration when dGPU (dedicated GPU) can connect directly to HDMI/DP output. If in doubt, search "VR-Ready laptops", as those are definitely MUXed.
  • For MUXless configuration which the dGPU share display alongside with iGPU (integrated GPU), you may need to extract your system's vBIOS for your card to avoid getting no output from your screen. Refer [here](#blank-screen-output-when-i-passthrough
btrfs fi show -d
(/dev/mapper/vg1000-lv)
syno_poweroff_task -d
(or: umount /volume1)
(or2: umount /volume1 -f -k)
Check to see if all us unmounted:
df -h
@gladiopeace
gladiopeace / Crack Sublime Text Windows and Linux.md
Created December 19, 2022 00:21 — forked from JerryLokjianming/Crack Sublime Text Windows and Linux.md
Crack Sublime Text 3.2.2 Build 3211 and Sublime Text 4 Alpha 4098 with Hex

YouTube Channel https://www.youtube.com/c/jerrylokjianming


How to Crack Sublime Text 3.2.2 Build 3211 with Hex Editor (Windows | Without License) ↓

  1. Download & Install Sublime Text 3.2.2 Build 3211
  2. Visit https://hexed.it/
@gladiopeace
gladiopeace / WaitForElement.py
Created December 6, 2022 19:17 — forked from lyf-is-coding/WaitForElement.py
Python Selenium Wait for an element tobe loaded
def WaitForElement(selector, text : str, delay : int):
try:
WebDriverWait(driver, delay).until(EC.presence_of_element_located((selector, text)))
print("Found element!")
return True
except TimeoutException:
print("Couldn't find element!")
return False
@gladiopeace
gladiopeace / start_pubg_global.bat
Created December 6, 2022 19:16 — forked from lyf-is-coding/start_pubg_global.bat
ADB start PUBGm Global version for Smartgaga
adb -s emulator-5554 shell mkdir /data/data/com.tencent.tinput1
adb -s emulator-5554 shell mkdir /data/data/com.tencent.tinput1/cache
adb -s emulator-5554 shell mkdir /data/data/com.tencent.tinput
adb -s emulator-5554 shell mkdir /data/data/com.tencent.tinput/cache
adb -s emulator-5554 shell am start com.tencent.ig/com.epicgames.ue4.SplashActivity filter
@gladiopeace
gladiopeace / _INSTALL.md
Created November 30, 2022 13:20 — forked from robinsmidsrod/_INSTALL.md
Bootstrapping full iPXE native menu with customizable default option with timeout (also includes working Ubuntu 12.04 preseed install)

Add the following chunk to your existing ISC dhcpd.conf file.

if exists user-class and ( option user-class = "iPXE" ) {
    filename "http://boot.smidsrod.lan/boot.ipxe";
}
else {
    filename "undionly.kpxe";
}

(or see https://gist.github.com/4008017 for a more elaborate setup

NOT UP TO DATE!

Things in this document might not work or be broken nowadays

my laptop:

I'm writing this here because a few things in here are spesific to this model laptop.
Dell XPS 15 9560 (4k) touch screen

Some notes:

Most things after setup are not specific for this laptop
# = run as root