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 / Hotalux_RE0209_NEC_code.md
Created February 7, 2024 12:30
Hotalux_RE0209_NEC_code.md
CH1
ON/OFF: Received NEC: address=0x6D82, command=0x40BF command_repeats=1
Full: Received NEC: address=0x6D82, command=0x59A6 command_repeats=1
明るく: Received NEC: address=0x6D82, command=0x45BA command_repeats=1
暗く: Received NEC: address=0x6D82, command=0x44BB command_repeats=1
白色: Received NEC: address=0x6D82, command=0x58A7 command_repeats=1
暖色: Received NEC: address=0x6D82, command=0x57A8 command_repeats=1

CH2
@hldh214
hldh214 / Default (Windows).sublime-keymap
Last active June 21, 2021 08:44
My sublime4 keymap && settings
[
{ "keys": [ "ctrl+alt+j" ], "command": "pretty_json_and_sort" },
{ "keys": [ "ctrl+alt+m" ], "command": "un_pretty_json" }
]
@hldh214
hldh214 / readme.md
Last active February 19, 2021 09:45
Least wasteful use of stamps to achieve a given postage

Problem

we have 2 kinds of stamp with values $A and $B, The

number of stamps is infinite, we have a letter to send out and need $T

postage, question is to find out the lowest cost required to get $T postage? Pls describe your method

and code it with any language you are good at( even we perfer C/C++ :)。

@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
@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:
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 / 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
@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://
namespace SkylinesMod
{
public class EnableAchievements : IUserMod
{
public string Name
{
get { return "Enable Achievements"; }
}
public string Description
@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.