Skip to content

Instantly share code, notes, and snippets.

@harilvfs
harilvfs / fix-dell-wifi-hard-block-linux.md
Last active August 1, 2026 19:10
Atheros AR9565 Wi-Fi not working on Dell laptop (blocked by dell-rbtn) Linux Fix

Fix dell wi-fi hard block on linux (dell-rbtn)

check your wireless interface status

ip link show wlp6s0

check the block status

@tatocaster
tatocaster / RealPathUtil.java
Last active August 1, 2026 19:06
Real Path Utility class for Android, works for all API
public class RealPathUtil {
public static String getRealPath(Context context, Uri fileUri) {
String realPath;
// SDK < API11
if (Build.VERSION.SDK_INT < 11) {
realPath = RealPathUtil.getRealPathFromURI_BelowAPI11(context, fileUri);
}
// SDK >= 11 && SDK < 19
else if (Build.VERSION.SDK_INT < 19) {
@ZapDos7
ZapDos7 / 00_git_intro.md
Last active August 1, 2026 18:58
Git Notes

Git

Technical Questions & Answers

When answering these questions, it's essential to show your ability to communicate technical concepts in an easy-to-understand manner and describe your work processes.

General

  1. What is a SAN, and how is it used?

SAN stands for a Storage Area Network. This is a high-speed, specialized network that gives block-level network access to storage. SANs are used to improve application availability, enhance performance, increase storage utilization and effectiveness and improve data security and protection.

  1. When is it appropriate to denormalize database design?

Denormalization is a database optimization technique used to improve a database's performance for specific queries. Denormalization may be needed when improvements need to be made to a database for it to meet your application requirements. However, denormalization will have an impact on what your database is able to do, so it's important to make sure it's needed for scalability or performance before choosing to use

@undirectlookable
undirectlookable / DJI-4G-VOHIVE.md
Created July 6, 2026 06:31
大疆4G模块修改设备ID并一键部署vohive平台教程

大疆的4G模块(1代)硬件性价比高(价格在30-40不等,之前还有25的),并有精美的外观(这点EC20裸板没法比的) 但其默认的USB VID/PID是大疆私有的,导致通用的linux驱动无法直接识别。 但本质它是移远EG25-G核心, 通过修改其内部参数,可以将其修改成经典的移远(Quectel)EC20/EC25模块,从而无缝接入vohive短信及网络管理平台。

经测试大疆4G模块(1代)完美支持电信volte,完美支持vohive

一、 修改大疆模块设备ID(修改为移远EC20/EC25)

在linux系统未插其他干扰模块的情况下,请确保已安装 socat 工具(用于发送AT指令):

@skeeto
skeeto / Makefile
Created February 12, 2022 15:59
ipinfo.io fetcher and parser in plain C and POSIX
.POSIX:
CC = cc
CFLAGS = -std=c99 -Wall -Wextra -g -fsanitize=address,undefined
LDFLAGS =
LDLIBS =
ipinfo$(EXE): ipinfo.c
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ ipinfo.c $(LDLIBS)
clean:
@rust-play
rust-play / Playground.toml Secret
Created August 1, 2026 18:24
Code shared from the Rust Playground
version = "1"
@4abhinavjain
4abhinavjain / reinstall_VPS_from_inside.txt
Last active August 1, 2026 18:14 — forked from ClashTheBunny/reinstall_VPS_from_inside.sh
DIY install debian on Oracle Cloud Infrastructure ( Free Tier ) - ARM64
# should works on any cloud-init enabled hypervisor (openstack.. )
# start from a normal ubuntu 20.04 install as minimal was not available for ARM64
# Since ARM64 machines has higher RAM, Shrinking is desired but not necessary. Instead we will increase tmpfs to 1700MB
# Getting root (if sudo -i doesn't work then set a root password beforehand using 'sudo passwd root'
sudo -i
# make sure we are on the highest kernel, so we can delete all the others ...
"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@mildsunrise
mildsunrise / hetzner-storage-box-auth.md
Last active August 1, 2026 18:07
Explanation of how SSH keys work in Hetzner storage boxes

Making Hetzner Storage Box authentication make sense

The documentation for this is pretty terrible and we had to figure this out by trial and error.

The storage box has a password, which is secret and random if not provided. It can be reset to an arbitrary one in the console ("Reset password" in the dropdown menu). Cannot be disabled. It's the only way to use WebDAV and SMB. Always accepted by SSH (and thus SFTP) on either port. It is the only way to recover a storage container you have locked yourself out of after losing SSH keys.

The SSH server on port 22 rejects shell, but it allows spawning the SFTP backend. Requests for any other command or subsystem seem to fail, so it seems to be made specifically for SFTP use.

The SSH server on port 23 offers a limited shell (rsh) with rsync, restic and a few other whitelisted commands. No redirections, pipes or other common shell features you'd expect. (dd is whitelisted, so yo