Skip to content

Instantly share code, notes, and snippets.

View hldh214's full-sized avatar
🦄
IP属地:武汉

Jim Liu hldh214

🦄
IP属地:武汉
View GitHub Profile
@hldh214
hldh214 / safe_schedule.py
Created July 19, 2017 04:24 — forked from mplewis/safe_schedule.py
An implementation of Scheduler that catches jobs that fail. For use with https://github.com/dbader/schedule
import logging
from traceback import format_exc
import datetime
from schedule import Scheduler
logger = logging.getLogger('schedule')
@hldh214
hldh214 / md5.js
Last active August 1, 2017 19:26
md5 algo with ~~JavaScript~~
var lZ1x = 8;
var VF2x = function(fw9n, cu7n) {
return fw9n << cu7n | fw9n >>> 32 - cu7n
};
var lj1x = function(x, y) {
var bAi2x = (x & 65535) + (y & 65535)
, cnf2x = (x >> 16) + (y >> 16) + (bAi2x >> 16);
return cnf2x << 16 | bAi2x & 65535
import time
import win32api
import win32con
from ctypes import windll, c_uint
recoil = [20, 21, 22, 21, 22, 22, 23, 22, 23, 23, 24, 24, 25, 25, 25, 25, 26, 27, 28, 29, 30, 32,
34, 34, 35, 34, 35, 34, 35, 34, 35, 34, 34, 34, 34, 34, 35, 35, 35, 35, 35, 35, 35, 35,
35, 35]
a = 0
@hldh214
hldh214 / gist:f14ccde18e0babdc57e49e20787fdd22
Created November 1, 2018 11:38 — forked from pwlin/gist:8a0d01e6428b7a96e2eb
Android : add cert to system store
https://code.google.com/p/android/issues/detail?id=32696#c5
If you have a certificate that is not
trusted by Android, when you add it, it goes in the personal cert store.
When you add a cert in this personal cert store, the system requires a
higher security level to unlock the device. But if you manage to add your
cert to the system store then you don't have this requirement. Obviously,
root is required to add a certificate to the system store, but it is quiet
easy.
namespace SkylinesMod
{
public class EnableAchievements : IUserMod
{
public string Name
{
get { return "Enable Achievements"; }
}
public string Description
@hldh214
hldh214 / npm-using-https-for-git.sh
Created April 2, 2019 08:14 — forked from taoyuan/npm-using-https-for-git.sh
Force git to use https:// instead of git://
git config --global url."https://github.com/".insteadOf git@github.com:
git config --global url."https://".insteadOf git://
@hldh214
hldh214 / supervisord.service
Created April 15, 2019 05:35 — forked from mozillazg/supervisord.service
install and configure supervisord on centos 7.
[Unit]
Description=supervisord - Supervisor process control system for UNIX
Documentation=http://supervisord.org
After=network.target
[Service]
Type=forking
ExecStart=/bin/supervisord -c /etc/supervisord/supervisord.conf
ExecReload=/bin/supervisorctl reload
ExecStop=/bin/supervisorctl shutdown
import logging
import pytesseract
import pywinauto
# Code by Daniel Kukiela (https://twitter.com/daniel_kukiela)
import ctypes
from threading import Thread
from time import sleep
from queue import Queue
@hldh214
hldh214 / gm4-polyfill.module.js
Created August 12, 2019 06:00 — forked from damoclark/gm4-polyfill.module.js
This helper script bridges compatibility between the Greasemonkey 4 APIs and existing/legacy APIs.
/*
This helper script bridges compatibility between the Greasemonkey 4 APIs and
existing/legacy APIs. Say for example your user script includes
// @grant GM_getValue
And you'd like to be compatible with both Greasemonkey 4 and Greasemonkey 4
(and for that matter all versions of Violentmonkey, Tampermonkey, and any other
user script engine). Add:
@hldh214
hldh214 / .inputrc
Last active October 28, 2022 07:45
YunDunKiller
# Respect default shortcuts.
$include /etc/inputrc
## arrow up
"\e[A":history-search-backward
## arrow down
"\e[B":history-search-forward
# suppress git bash flicker
set bell-style none