Skip to content

Instantly share code, notes, and snippets.

View henryhchchc's full-sized avatar
🍵
I'm a teapot

Henry Chu henryhchchc

🍵
I'm a teapot
View GitHub Profile
// ==UserScript==
// @name Disable ESC
// @description Prevent ESC from exiting fullscreen
// @updateURL hhttps://gist.githubusercontent.com/henryhchchc/95b76dcf1c7a5f1b16c93a2829fc09c7/raw/disable_esc.js
// @match *://*/*
// ==/UserScript==
document.onkeydown = function (evt) {
if (evt.keyCode == 27) evt.preventDefault();
}
@henryhchchc
henryhchchc / accept-invitation.sh
Created October 3, 2022 02:22
Automation script for accept all the repository invitation on GitHub
#! /bin/sh
API_KEY="$1"
[ -z $API_KEY ] && echo "Usage: \n\taccept-invitation.sh <API_KEY>" && exit 1
INVITATION_IDS=$(curl -s -H "Accept: application/vnd.github+json" -H "Authorization: Bearer $API_KEY" https://api.github.com/user/repository_invitations | jq -r ".[].id")
for id in $INVITATION_IDS; do
curl \
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\InputMethod\Settings\CHS]
"UserDefinedDoublePinyinScheme0"="Xiaohe*2*^*iuvdjhcwfg xmlnpbksqszxkrltvyovt"
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\InputMethod\Settings\CHT]
"UserDefinedDoublePinyinScheme0"="Xiaohe*2*^*iuvdjhcwfg xmlnpbksqszxkrltvyovt"
@henryhchchc
henryhchchc / mx_master3_mac.json
Created June 27, 2021 02:15
Side button mapping for MX Master 3 for Mac
{
"title": "Logitech MX Master 3 for Mac",
"rules": [
{
"description": "Side button for desktop switch",
"manipulators": [
{
"type": "basic",
"from": {
"pointing_button": "button4"
@henryhchchc
henryhchchc / GodDrinksJava.java
Created March 30, 2017 11:28 — forked from hibiyasleep/GodDrinksJava.java
world.execute(me);
package goddrinksjava;
/**
* The program GodDrinksJava implements an application that
* creates an empty simulated world with no meaning or purpose.
*
* @author momocashew
* @lyrics hibiyasleep
*/