Skip to content

Instantly share code, notes, and snippets.

@Noltari
Noltari / 1 - prerequisites
Last active August 30, 2025 17:53
OpenWrt Cloudflare (WARP)
# Step 1 -> get wgcf (cli for Cloudflare WARP)
https://github.com/ViRb3/wgcf/releases
# Step 2 -> create account -> wgcf-account.toml
wgcf register
# Step 3 -> generate WireGuard profile -> wgcf-profile.conf
wgcf generate
# Step 4 -> extract values from wgcf-profile.conf
@thanksshu
thanksshu / check_cf_warp_endpoint.py
Last active September 17, 2025 15:37
Test cloudflare WARP endpoints
"""
Test cloudflare WARP endpoints
Select all the best WARP endpoints
Thanks to https://gitlab.com/Misaka-blog/warp-script#warp-endpoint-ip-优选脚本
"""
import asyncio
import csv
import ipaddress
import logging
@allisson
allisson / ubuntu-2204-remove-snap.md
Last active October 11, 2025 21:48
Ubuntu 22.04 remove snap

Remove snaps

sudo snap remove --purge firefox
sudo snap remove --purge snap-store
sudo snap remove --purge snapd-desktop-integration
sudo snap remove --purge gtk-common-themes
sudo snap remove --purge gnome-3-38-2004
sudo snap remove --purge core20
sudo snap remove --purge bare
sudo snap remove --purge snapd
@lmmx
lmmx / nosnap.pref
Created February 2, 2021 09:23
Contents of `/etc/apt/preferences.d/nosnap.pref` in Linux Mint 20.1 (removed manually to install `snapd`) https://linuxmint-user-guide.readthedocs.io/en/latest/snap.html
# To prevent repository packages from triggering the installation of Snap,
# this file forbids snapd from being installed by APT.
# For more information: https://linuxmint-user-guide.readthedocs.io/en/latest/snap.html
Package: snapd
Pin: release a=*
Pin-Priority: -10
@jgkim2020
jgkim2020 / 10-quirks.conf
Created May 19, 2020 06:55
Fix for MSI laptop random screen brightness bug (/usr/share/X11/xorg.conf.d/10-quirks.conf)
# MSI laptop random screen brightness bug
# https://askubuntu.com/questions/777754/brightness-randomly-up-and-down-on-msi-laptop/808785#808785
Section "InputClass"
Identifier "Spooky Ghosts"
MatchProduct "Video Bus"
Option "Ignore" "on"
EndSection
@Juul
Juul / autossh_reverse_tunnel.md
Last active March 28, 2025 04:55
How to configure a reverse SSH tunnel that auto-establishes and auto-reconnects

This is a brief guide on how to configure an SSH reverse tunnel that automatically establishes on boot and will continuously attempt to re-connect when it fails.

It is very useful if you are deploying a device somewhere without a public IP, e.g. behind a NAT, and need to be able to SSH into it from the wider internet.

Let's refer to the NAT'ed device as the client. This guide assumes that the client is able to create outgoing SSH connections to at least destination port 443.

You will need root access to a server with a static IP on the internet which runs an openssh server.

On my-server.example.com add the following to /etc/ssh/sshd_config, changing tunnel-user to whichever username you want to use (this will be a new user, not an exising user) and changing the PermitOpen line:

@alexandreelise
alexandreelise / README.md
Last active October 25, 2024 00:12
Install gcc 9 on Ubuntu LTS 12.04,14.04,16.04 and 18.04

Hi! gcc users

There is good news for you. I made a new repository with a single Dockerfile to build every combinations of versions of Ubuntu LTS and gcc you like

Find out more on https://github.com/alexandreelise/install-gcc

server:
module-config: "subnetcache validator iterator"
chroot: "/usr/local/etc/unbound"
directory: "/usr/local/etc/unbound"
username: "unbound"
port: 5353
do-ip4: yes
do-ip6: no
do-udp: yes
do-tcp: yes
@mrpeardotnet
mrpeardotnet / PVE-HP-ssacli-smart-storage-admin.md
Last active October 2, 2025 00:38
HP Smart Storage Admin CLI (ssacli) installation and usage on Proxmox PVE (6.x)

HP Smart Storage Admin CLI (ssacli) installation and usage on Proxmox PVE (6.x)

Why use HP Smart Storage Admin CLI?

You can use ssacli (smart storage administrator command line interface) tool to manage any of supported HP Smart Array Controllers in your Proxmox host without need to reboot your server to access Smart Storage Administrator in BIOS. That means no host downtime when managing your storage.

CLI is not as convenient as GUI interface provided by BIOS or desktop utilities, but still allows you to fully manage your controller, physical disks and logical drives on the fly with no Proxmox host downtime.

ssacli replaces older hpssacli, but shares the same syntax and adds support for newer servers and controllers.

Installation

@cjyar
cjyar / mbr-to-gpt-uefi.md
Last active August 9, 2025 18:54
Convert a disk from MBR to GPT+UEFI, in Linux.

Before starting, make sure you have a backup, and make sure to have a linux live boot ready to rescue your system. It's easy to mess this up!

  1. Use gdisk to convert the partition table to GPT.

    gdisk /dev/sda

  2. Create the "BIOS boot" partition that GRUB needs.

    n to create a new partition. Needs to be about 1MB. You can probably squeeze this in from sectors 34-2047. Use L or l to look up the code for "BIOS boot" (ef02).

  3. Write the new partition table.

    w

  4. Reload the partition table. > partprobe /dev/sda