Skip to content

Instantly share code, notes, and snippets.

View shunia's full-sized avatar
💭
hV7?eR6#hC5-qT6+

shunia shunia

💭
hV7?eR6#hC5-qT6+
  • GEHC
  • Beijing,China
View GitHub Profile
@olets
olets / A Tailwind CSS aspect-ratio Replacement Supporting Safari 14.md
Last active October 11, 2023 19:25
A Tailwind CSS aspect-ratio Replacement Supporting Safari 14
@alyleite
alyleite / wsl.md
Last active March 14, 2025 15:53
Failed to connect to bus: Host is down - WSL 2

» sudo systemctl daemon-reload

System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down

==============================================

Edit*

  1. Open /etc/wsl.conf with any editor:
@phlinhng
phlinhng / a-clash-tproxy-gateway.md
Last active December 30, 2024 10:51
Clash as transparent proxy gateway via TPROXY

Notes

  1. If your local network use public IP ranges instead of private ones, make sure to add respecive RETURN rules to iptables to prevent looping issue
  2. Set clash as DHCP's only DNS server to allow domain-based filter (shunting) rules work
  3. Use lsof -i udp:53 to check if clash's DNS module work fine, otherwise you may have to kill systemd-resolved and any other processes occupying the UDP 53 port
  4. The given scripts will NOT hangle the traffic of gateway itself since it is not recommend to do so. If you want to redirect the egress traffic of the gateway, the following material may be useful

Reference

@mattyellen
mattyellen / UnityAsyncOperationAwaiter.cs
Created July 26, 2020 19:36
Allows the use of async/await (instead of yield) with any Unity AsyncOperation
public static class ExtensionMethods
{
public static TaskAwaiter GetAwaiter(this AsyncOperation asyncOp)
{
var tcs = new TaskCompletionSource<object>();
asyncOp.completed += obj => { tcs.SetResult(null); };
return ((Task)tcs.Task).GetAwaiter();
}
}
@499978920
499978920 / profile.ps1
Last active April 15, 2025 08:12
[powershell proxy] power shell 走代理 #powershell #proxy
# path
# C:\Program Files\PowerShell\7
function set_proxy {
$proxy = 'http://127.0.0.1:7890'
# temporary
$env:HTTP_PROXY = $proxy
$env:HTTPS_PROXY = $proxy
@nukadelic
nukadelic / EditorFontSize.cs
Last active April 11, 2025 00:34
Unity Editor Font Size Changer -- EditorStyles
#if UNITY_EDITOR
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using System.Reflection;
public class EditorFontSize : EditorWindow
{
// enable resize on launch to set a default font size , using this option will disable the ability to have the window accassible
@maboloshi
maboloshi / README.md
Last active March 29, 2025 14:24
[Mac下配置Aria2] #macOS #aria2

Mac下配置Aria2

安装和设置 Aria2

# 使用 Homebrew 安装 aria2
brew install aria2

# 创建配置文件aria2.conf和空对话文件aria2.session
mkdir ~/.aria2 && cd ~/.aria2
touch aria2.conf
@yuzebin
yuzebin / open163_dl.sh
Last active June 15, 2018 08:10
网易公开课下载脚本 open.163.com
#!/usr/bin/env bash
# author: yuzebin AT gmail
# 20180614
# open163_dl.sh
main() {
mkdir -p $2
cd $2
curl $1 | grep -e "http://open.163.com/movie/" | enca -L zh -x UTF-8 | sed -e "s/\<a href=\"//g" -e "s/\>//g" -e "s/<\/a//g" | grep -v class | sed -e "s/\ //g"> $2.lst
@tommyettinger
tommyettinger / mulberry32.c
Last active February 24, 2025 16:25
Mulberry32 PRNG
/* Written in 2017 by Tommy Ettinger ([email protected])
To the extent possible under law, the author has dedicated all copyright
and related and neighboring rights to this software to the public domain
worldwide. This software is distributed without any warranty.
See <http://creativecommons.org/publicdomain/zero/1.0/>. */
#include <stdint.h>
@dmnsgn
dmnsgn / WebGL-WebGPU-frameworks-libraries.md
Last active April 20, 2025 19:36
A collection of WebGL and WebGPU frameworks and libraries

A non-exhaustive list of WebGL and WebGPU frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are wip/outdated/not maintained anymore.

Engines and libraries ⚙️

Name Stars Last Commit Description
three.js ![GitHub