Skip to content

Instantly share code, notes, and snippets.

View rsp4jack's full-sized avatar
🕒
Awaiting

rsp4jack rsp4jack

🕒
Awaiting
  • 17:17 (UTC +08:00)
View GitHub Profile
@GaryLee
GaryLee / high_cpu_usage_for_acpi_notifiy.md
Last active March 30, 2025 01:08
處理高ACPI interrupt造成high CPU usage的問題
@mentha
mentha / ppua.py
Last active November 27, 2022 11:12
proxy protocol v2 universal adapter
#!/usr/bin/env python3
from argparse import ArgumentParser
from collections import namedtuple
from contextlib import AsyncExitStack
from ipaddress import IPv4Address, IPv6Address, IPv4Network, IPv6Network
from signal import signal, SIGHUP, SIGINT, SIGTERM
from socket import socket, AF_INET, AF_INET6, SOCK_STREAM, IPPROTO_IP, IP_TRANSPARENT, SHUT_WR
import asyncio as aio
import logging
@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active November 15, 2025 02:37
Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@Qix-
Qix- / coro.cpp
Created September 29, 2020 04:16
C++20 coroutines + LibUV sample, v2
// Thank you to the folks at the C++ slack channel,
// along with @lewissbaker for the excellent literature
// (even though it took me a few days to be convinced
// it really was so).
#include <uv.h>
#include <iostream>
#include <experimental/coroutine>
@nfsarmento
nfsarmento / nginx-wordpress.conf
Last active November 2, 2025 09:45
Harden wordpress security nginx
############ WordPress ####################
# Disable logging for favicon and robots.txt
location = /favicon.ico {
try_files /favicon.ico @empty;
access_log off;
log_not_found off;
expires max;
}
@Integralist
Integralist / Python Asyncio Timing Decorator.py
Last active December 30, 2024 22:10
Python Asyncio Timing Decorator
import asyncio
import time
def timeit(func):
async def process(func, *args, **params):
if asyncio.iscoroutinefunction(func):
print('this function is a coroutine: {}'.format(func.__name__))
return await func(*args, **params)
else:
@pascalduez
pascalduez / SassMeister-input.scss
Last active February 15, 2025 07:07
Some Sass string functions: capitalize, ucwords, camelize, ...
// ----
// Sass (v3.3.4)
// Compass (v1.0.0.alpha.18)
// ----
// Capitalize string
// --------------------------------------------------------------------------------
// @param [string] $string
// --------------------------------------------------------------------------------
// @return [string]