Skip to content

Instantly share code, notes, and snippets.

View schnell18's full-sized avatar

Justin Zhang schnell18

View GitHub Profile
@henrik242
henrik242 / p4merge
Last active January 5, 2023 22:23
Helper script for p4merge and Git on MacOSX
#!/bin/bash
for arg; do [[ $arg = /* ]] || arg=$PWD/$arg; absargs+=("$arg"); done;
/Applications/P4Merge.app/Contents/Resources/launchp4merge "${absargs[@]}"
@schnell18
schnell18 / mount_all_user_writable.sh
Created May 10, 2014 08:44
Mount the USB disk or SD card and grant write access to all users
sudo mount -o umask=0,uid=nobody,gid=nobody /dev/something /mnt/somewhere
@plembo
plembo / debianvmvirtinst.md
Last active March 2, 2024 19:14
Install a Debian VM using virt-install

Installing a Debian VM with virt-install on KVM (libvirtd)

This turned out to be easier than I thought it would, especially after struggling with Ubuntu.

Both procedures use a common debian.env file to hold environment variables applied in the script.

When installing Debian always be sure to select an apt mirror when prompted, if you don't you'll regret it.

Environment variables

In a file, debian.env:

@henshaw
henshaw / disallow-genai-bots.txt
Last active June 30, 2024 15:47
Disallow all pages from being trained for LLMs by all major GenAI bots
User-agent: Amazonbot
User-agent: Anthropic-ai
User-agent: Applebot-Extended
User-agent: AwarioRssBot
User-agent: AwarioSmartBot
User-agent: Bytespider
User-agent: CCBot
User-agent: ChatGPT-User
User-agent: ClaudeBot
User-agent: Claude-Web
@SaeedDev94
SaeedDev94 / nvidia-driver.sh
Last active June 27, 2024 09:53
Manual nvidia driver installation on Ubuntu desktop 24.04 LTS
# Guide ref
# https://www.if-not-true-then-false.com/2021/debian-ubuntu-linux-mint-nvidia-guide
# This is not a real script !!
# Do not run it !!
# Check if secure boot disabled
mokutil --sb-state
# Get GPU model
lspci | grep "VGA"