Skip to content

Instantly share code, notes, and snippets.

@larrybotha
larrybotha / A.markdown
Last active October 21, 2024 15:28
Merge wiki updates that are on a fork of your repo.

Merge Wiki Changes From A Forked Github Repo

This is inspired (or basically copied) from How To Merge Github Wiki Changes From One Repository To Another, by Roman Ivanov, and serves to ensure that should something happen to the original article, the information remains nice and safe here.

Terminology

OREPO: original repo - the repo created or maintained by the owner

FREPO: the forked repo that presumably has updates to its wiki, not yet on the OREPO

@adam-p
adam-p / Local PR test and merge.md
Last active April 1, 2025 20:23
Testing a pull request, then merging locally; and avoiding TOCTOU

It's not immediately obvious how to pull down the code for a PR and test it locally. But it's pretty easy. (This assumes you have a remote for the main repo named upstream.)

Getting the PR code

  1. Make note of the PR number. For example, Rod's latest is PR #37: Psiphon-Labs/psiphon-tunnel-core#37

  2. Fetch the PR's pseudo-branch (or bookmark or rev pointer whatever the word is), and give it a local branch name. Here we'll name it pr37:

$ git fetch upstream pull/37/head:pr37
@numinit
numinit / 0-index.md
Last active April 6, 2024 21:54
patch -p0 < fix-vega-reset.patch
@gnif
gnif / vega-10-reset.c
Last active July 2, 2020 10:02
Experimental NON FUNCTIONAL vega 10 reset
static int reset_amdgpu_vega(struct pci_dev *dev, int probe) {
#define AMDGPU_MAX_USEC_TIMEOUT 100000
#define MP0_BASE 0x16000
#define mmMP0_SMN_C2PMSG_33 ((MP0_BASE + 0x0061) * 4)
#define mmMP0_SMN_C2PMSG_64 ((MP0_BASE + 0x0080) * 4)
#define mmMP0_SMN_C2PMSG_81 ((MP0_BASE + 0x0091) * 4)
resource_size_t rmmio_base, rmmio_size;
void __iomem *rmmio;
int ret;
@key-networks
key-networks / zerotier_rules.sh
Last active September 25, 2024 01:37
Bash script to add rules to Zerotier Network Controller
#!/bin/sh
#
# ztncui - ZeroTier network controller UI
# Copyright (C) 2017-2019 Key Networks (https://key-networks.com)
# Licensed under GPLv3 - see LICENSE for details.
#
TOKEN=`sudo cat /var/lib/zerotier-one/authtoken.secret`
echo -e "This is the list of networks avaialble on this Network Controller:"
@zoilomora
zoilomora / README.md
Last active April 20, 2025 20:46
How to disable systemd-resolved in Ubuntu

How to disable systemd-resolved in Ubuntu

Stages

  • Disable and stop the systemd-resolved service:

      sudo systemctl disable systemd-resolved.service
      sudo systemctl stop systemd-resolved
    
  • Then put the following line in the [main] section of your /etc/NetworkManager/NetworkManager.conf:

@niw
niw / Vagrantfile
Last active April 22, 2025 11:54
A simple Vagrantfile to setup Ubuntu desktop environment with Google Chrome and Japanese input
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/bionic64"
config.vm.provider :virtualbox do |v|
v.gui = true
v.memory = 2048
end
# Currently "ubuntu/bionic64" on VirtualBox requires `type: "virtualbox"`
# to make synced folder works.
@Andoryuuta
Andoryuuta / cwb_taming.csv
Created September 20, 2019 07:01
A taming table for Cube World Beta (0.9.1-0)
ID Creature TamingItem
0 ElfMale Bait (0 AKA non-tameable)
1 ElfFemale Bait (1 AKA non-tameable)
2 HumanMale Bait (2 AKA non-tameable)
3 HumanFemale Bait (3 AKA non-tameable)
4 GoblinMale Bait (4 AKA non-tameable)
5 GoblinFemale Bait (5 AKA non-tameable)
6 Bullterrier Bait (6 AKA non-tameable)
7 LizardmanMale Bait (7 AKA non-tameable)
8 LizardmanFemale Bait (8 AKA non-tameable)
@yunooooo
yunooooo / debloat_jdownloader.md
Created December 3, 2022 04:34
Full JDownloader 2 Installation & Debloating (Removing Built-in Ads) Guide.

Full JDownloader 2 Installation & Debloating (Removing Built-in Ads) Guide.

This guide will teach you how to fully install and debloat JDownloader 2, a software that splits the file you want to download to make the file download speed much faster (a goal similar to IDM), Aight, Let's begin!

Installation Part

You need to go to https://jdownloader.org/jdownloader2 and click on the button of your operating system.