Skip to content

Instantly share code, notes, and snippets.

@lilydjwg
lilydjwg / btrfs-autosnapshot
Last active April 27, 2024 13:43
btrfs-autosnapshot
#!/usr/bin/python3
import os
import datetime
import subprocess
import logging
import tempfile
import contextlib
import ctypes
from pathlib import Path
@nikhita
nikhita / minikube-upgrade.md
Created February 12, 2020 17:22
How to upgrade minikube to the latest version in Linux.

Find the current version

$ minikube version
minikube version: v1.7.1

Check if there are newer versions available

@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active April 27, 2024 13:42
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized

Docker Hub 镜像加速器

国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。

Dockerized 实践 https://github.com/y0ngb1n/dockerized

配置加速地址

Ubuntu 16.04+、Debian 8+、CentOS 7+

@jo-chemla
jo-chemla / kapture-cropper.py
Last active April 27, 2024 13:41
Quick utility to crop a kapture images and adapt intrinsics
# py kapture-cropper.py -i dataset-kapture\ --border_px 0 --scale_factor 1 -v
import kapture
import kapture.io.csv as csv
from PIL import Image
from kapture.io.csv import kapture_to_dir
import os, logging, argparse
import kapture.utils.logging
logger = logging.getLogger("kapture-cropper")
@denguir
denguir / cuda_install.md
Last active April 27, 2024 13:40
Installation procedure for CUDA & cuDNN

How to install CUDA & cuDNN on Ubuntu 22.04

Install NVIDIA drivers

Update & upgrade

sudo apt update && sudo apt upgrade

Remove previous NVIDIA installation

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 27, 2024 13:44
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@metadaddy
metadaddy / b2_multipart.php
Last active April 27, 2024 13:35
PHP sample code for a multipart file upload to Backblaze B2. Usage: php php_multipart.php [-v] <bucket_name> <local_file>
<?php
// PHP sample code to show multipart file upload using the B2 Native API
// User supplies optional -v for verbose output from curl, then bucket name
// and path to local file
$rest_index = null;
$opts = getopt("v::", [], $rest_index);
$args = array_slice($argv, $rest_index);
@mumrah
mumrah / run.py
Created November 9, 2017 18:11
Python script to decode AX.25 from KISS frames over a serial TNC
import hexdump
import kiss
import struct
def decode_addr(data, cursor):
(a1, a2, a3, a4, a5, a6, a7) = struct.unpack("<BBBBBBB", data[cursor:cursor+7])
hrr = a7 >> 5
ssid = (a7 >> 1) & 0xf
ext = a7 & 0x1
@NickMcSweeney
NickMcSweeney / postgresql_plus_arch-linux.md
Last active April 27, 2024 13:34
Getting postgresql running on Arch Linux

Setup Postgresql

run postgresql with systemctl

Install postgres

latest

sudo pacman -S postgresql

specific version

find version & build from source