Skip to content

Instantly share code, notes, and snippets.

View krrr's full-sized avatar
🎮
gaming

krrr krrr

🎮
gaming
View GitHub Profile
@krrr
krrr / yuanshen.ahk
Created May 7, 2023 07:09
genshin dialog auto skip
#MaxThreadsPerHotkey 2
if (not A_IsAdmin)
Run '*RunAs "' A_AhkPath '" /restart "' A_ScriptFullPath '"'
skipDialogRunning := false
DIALOG_NAME_COLOR := 0xFFC300
#HotIf WinActive("ahk_exe YuanShen.exe")
@krrr
krrr / conoha.py
Last active January 6, 2020 10:29
Create Conoha VPS by image, and get ip address; then 🎮🎮🎮; finally delete the VPS
from requests.exceptions import *
import json
import requests
import sys
import time
# original author: https://takulog.info/python-script-create-conoha-server/
''' === Setting Parameters ============================= '''
@krrr
krrr / dlsite_viewerrip_201904fix.c
Last active April 20, 2019 04:25
fix memory leaking (32bit process out of memory, and fail to rip large files)
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <malloc.h>
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif//WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include <WindowsX.h>
@krrr
krrr / win-tfo.cpp
Last active October 22, 2017 13:13
Windows 10 TCP fast open sample
#include <stdio.h>
#include <WinSock2.h>
#include <MSWSock.h>
#include <WS2tcpip.h>
#pragma comment(lib, "Ws2_32.lib")
static LPFN_CONNECTEX ConnectEx = NULL;
@krrr
krrr / SoftEther.log
Last active March 8, 2018 11:12
GFW SoftEther VPN active-probing (try to trace prober)
2016-07-17 01:46:12.028 On the TCP Listener (Port 443), a Client (IP address 74.82.47.2, Host name "scan-09.shadowserver.org", Port number 52925) has connected.
2016-07-17 01:46:12.028 For the client (IP address: 74.82.47.2, host name: "scan-09.shadowserver.org", port number: 52925), connection "CID-108" has been created.
2016-07-17 01:46:16.373 SSL communication for connection "CID-108" has been started. The encryption algorithm name is "AES128-SHA".
2016-07-17 01:46:17.810 Connection "CID-108" terminated by the cause "A client which is non-SoftEther VPN software has connected to the port." (code 5).
2016-07-17 01:46:17.810 Connection "CID-108" has been terminated.
2016-07-17 01:46:17.810 The connection with the client (IP address 74.82.47.2, Port number 52925) has been disconnected.
2016-07-17 01:47:55.678 On the TCP Listener (Port 443), a Client (IP address 74.82.47.2, Host name "scan-09.shadowserver.org", Port number 40041) has connected.
2016-07-17 01:47:55.678 For the client (IP address: 74.82.47.2, hos
@krrr
krrr / redshift-auto.svg
Last active April 13, 2016 14:12
Redshift GUI frontend for Windows
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@krrr
krrr / brightness.ahk
Last active March 23, 2024 18:09
Windows screen brightness fine tune (autohotkey)
#,::
AdjustScreenBrightness(-3)
Return
#.::
AdjustScreenBrightness(3)
Return
AdjustScreenBrightness(step) {
service := "winmgmts:{impersonationLevel=impersonate}!\\.\root\WMI"
@krrr
krrr / git-update-check.py
Created December 9, 2015 06:08
Implement app's update checking by git tagging
import re
import requests
from distutils.version import LooseVersion
# we are smart client and do not support dumb protocal
# protocol document: https://github.com/git/git/blob/master/Documentation/technical/http-protocol.txt
class GitHttpError(Exception):
pass
gap_seq = [701, 301, 132, 57, 23, 10, 4, 1]
def shell_sort(l):
for g in gap_seq:
insert_sort(l, g)
def insert_sort(l, gap=1):
# elements whose index < i are sorted
for i in range(gap, len(l)):
for j in range(i, gap-1, -gap):