Skip to content

Instantly share code, notes, and snippets.

View houkanshan's full-sized avatar
👾
My game is Mai and I like making names

Mai Hou houkanshan

👾
My game is Mai and I like making names
View GitHub Profile
@houkanshan
houkanshan / zip-app.exe
Last active December 31, 2023 01:23 — forked from Draknek/zip-app.py
A python3 port of Draknek's zip-app.py
This file has been truncated, but you can view the full file.
@houkanshan
houkanshan / del-console.sh
Created October 9, 2013 15:14
Clear "console.log" before `git commit`, and recover them after `git commit`, add them to git-hooks file: pre-commit & post-commit ~
#!/bin/sh
debug_rex='/console.log/'
debug_print_rex=$debug_rex'p'
debug_del_rex=$debug_rex' d'
add_debug_patch='.add-debug.patch'
del_debug_patch='.del-debug.patch'
git_work_dir="$(git rev-parse --show-toplevel)"
fake_file="$git_work_dir/.fake_file"
cur_dir="$(pwd)"
// ==UserScript==
// @name google sheet read.
// @namespace https://houkanshan.com
// @version 0.1
// @description try to take over the world!
// @author Houkanshan
// @match https://docs.google.com/spreadsheets/*
// @grant none
// ==/UserScript==
// ==UserScript==
// @name FreeSound Shortcuts (New)
// @namespace http://tampermonkey.net/
// @version 0.2.3
// @description Up/Down to play sample, Enter to Open page, R to replay, Space to play/pause. Doesn't work on new UI.
// @author houkanshan
// @match https://freesound.org/*
// @icon https://freesound.org/favicon.ico
// @grant none
// ==/UserScript==
@houkanshan
houkanshan / ugly-journalists.user.js
Last active August 7, 2022 15:26
Ugly journalists
// ==UserScript==
// @name Ugly journalists
// @description Caught You.
// @namespace https://houkanshan.com/
// @version 0.1.2
// @author Houkanshan
// @match https://*/*
// @match http://*/*
// @grant none
// @run-at document-end
HID Bluetooth Library Started
BTD ConfigureDevice
BTD Init
Addr: 01
Endpoint descriptor:
Length: 07
Type: 05
Address: 81
Attributes: 03
@houkanshan
houkanshan / itch-io-macos-tip.css
Last active May 31, 2021 01:23
Add a tip to unnotarized macOS game on Itch.io
.download_platforms .icon-apple {
position: relative;
font-family: 'icomoon', var(--itchio_font_family) !important;
}
.download_platforms .icon-apple::before {
content: "\e011 Can't Open?";
}
.download_platforms .icon-apple::after {
const path = require('path')
function checkModule(name, sendMessage) {
try {
const m = require(name)
} catch(e) {
sendMessage(e)
throw e
}
}
function MD5 (input) {
var rawHash = Utilities.computeDigest(Utilities.DigestAlgorithm.MD5, input, Utilities.Charset.UTF_8);
var txtHash = '';
for (i = 0; i < rawHash.length; i++) {
var hashVal = rawHash[i];
if (hashVal < 0) {
hashVal += 256;
}
if (hashVal.toString(16).length == 1) {
txtHash += '0';
@houkanshan
houkanshan / First.compute
Created March 16, 2020 19:20 — forked from yumayanagisawa/First.compute
Unity | Compute Shader Particle System
#pragma kernel CSParticle
// Particle's data
struct Particle
{
float3 position;
float3 velocity;
float life;
};