Skip to content

Instantly share code, notes, and snippets.

View breakertt's full-sized avatar
🐧
Exploring Linux Kernel!

Tianyi Gao breakertt

🐧
Exploring Linux Kernel!
  • School of Informatics, University of Edinburgh
  • Edinburgh, UK
  • 10:24 (UTC)
View GitHub Profile
const uptimerobot_id = 'your uptimerobot_id'
const upstream = 'stats.uptimerobot.com'
const upstream_path = '/' + uptimerobot_id
const replace_dict = {
'$upstream': '$custom_domain',
@chaiyujin
chaiyujin / ubuntu_update_booting_kernel.md
Created December 8, 2020 12:42
Ubuntu: Install Kernel and Set GRUB Default Kernel

Ubuntu: Install Kernel and Set GRUB Default Kernel

Install Kernel

Install the default kernel:

sudo apt install linux-generic

Set GRUB Default Kernel

  1. Find entrance from /boot/grub/grub.cfg
    • Get the $menuentry_id_option:
@ruanbekker
ruanbekker / multipass_create_vm.md
Created January 6, 2020 23:26
Provision a VM with Multipass

Install Multipass on Mac

$ brew cask install multipass

Create a SSH Key

$ sh-keygen -b 2048 -f ~/.ssh/multipass -t rsa -q -N ""
@zoilomora
zoilomora / README.md
Last active December 19, 2025 11:48
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:

@nfvs
nfvs / autossh-socks5-proxy.sh
Last active August 3, 2024 18:48
Use autossh to setup a local socks5 proxy
[Unit]
Description=AutoSSH socks5 tunnel
After=network-online.target ssh.service
[Service]
Environment="AUTOSSH_GATETIME=0"
ExecStart=/usr/bin/autossh -M 0 -N -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i /root/.ssh/id_rsa -D 0.0.0.0:1080 root@127.0.0.1
ExecStop=/bin/kill $MAINPID
[Install]
@lucidyan
lucidyan / gpu-control.md
Last active March 19, 2023 09:37
Prevent NVIDIA GPUs' throttling on headless server

Prevent NVIDIA GPUs' throttling on headless server

  • Unlock manual fan & overclock settings
    sudo nvidia-xconfig -a --cool-bits=28 --allow-empty-initial-configuration
  • Reboot system
  • Create script /usr/local/bin/gpu-fan-control.sh
#!/bin/bash
@gyulkkajo
gyulkkajo / c_cpp_properties.json
Last active September 11, 2025 08:41
IntelliSense config file for Linux kernel X86_64.
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}",
"LINUX_PATH/include",
"LINUX_PATH/include/uapi",
"LINUX_PATH/include/generated",
"LINUX_PATH/arch/x86/include",
@DavidMetcalfe
DavidMetcalfe / nvidia-x-server-settings.txt
Last active January 12, 2025 21:08
Documents the PowerMizer CLI for potential cron jobs, etc.
Because PowerMizer settings in NVIDIA X Server Settings doesn't persist across sessions,
attempts to overclock can become a nuisance.
The following documents the three CLI settings to modify the Preferred Mode as desired:
# Auto:
nvidia-settings -a [gpu:0]/GPUPowerMizerMode=2
# Adaptive:
nvidia-settings -a [gpu:0]/GPUPowerMizerMode=0