Skip to content

Instantly share code, notes, and snippets.

View Cat7373's full-sized avatar
🏭
Working...

Cat73 Cat7373

🏭
Working...
View GitHub Profile
@Cat7373
Cat7373 / ex.sh
Created January 28, 2023 01:24
Mac fix zoom
killall Dock
killall Finder
@Cat7373
Cat7373 / README.md
Last active October 7, 2023 02:22
Apple Silicon(M1/M2/M3......) + macOS + MultiMC + Minecraft 1.19 + Native LWJGL

俺手拿防身水果刀

对准挣扎的张妙

让你回头记车牌儿

俺送你去阴曹

俺天天飙车道上跑

@Cat7373
Cat7373 / nami.js
Last active January 29, 2024 06:01
逃离 Nami 小游戏
// 原型
逃离纳米 = callback => {
// 经典游戏:
// Nami 抓住了 200 名群员,为他们每个人分配了 1 ~ 200 的编号,然后准备了标有 1 ~ 200 编号的盒子,将标有 1 ~ 200 的球乱序放入盒子中
// 每个人依次单独进入放盒子的房间,允许翻看最多 100 个盒子,若所有人都找到自己编号的球,则允许所有人离开,否则所有人都要葬身 Nami 腹中
// 注:即使没有找到自己编号的球,游戏仍会继续下去,直到所有人都进完房间,才会得知可以离开还是被吃
// 请发挥你的聪明才智,编写逃出率更高的代码吧!
// callback 会按顺序为每个编号的群员调用,参数为(群员编号, 开盒子(盒子编号)),开盒子函数会返回开出的球编号
// 你的函数会自动用于进行 1000 轮游戏,并输出逃出率
// 示例使用方式: > 逃离纳米((no, viewBox) => { viewBox(1); viewBox(2); viewBox(3); ... })
@Cat7373
Cat7373 / idea.md
Last active November 7, 2019 06:31
idea.md
  1. App -> Preferences -> Editor -> General -> Editor Tabs -> Tab placement: None
    • 使用 Cmd + E 和 Cmd + Shift + E 来代替
    • 使用 Fn + Option + ← 来代替
  2. View -> Appearance -> Navigation Bar -> 取消勾选
    • 使用 Fn + Cmd + F9 来 Build
    • 使用 Fn + Shift + F9 来 Debug
    • 使用 Fn + Shift + F10 来 Run
  3. View -> Appearance -> Status Bar -> 取消勾选
  4. 安装插件
  • IDEAVim
-Xms128m
# -Xmx1024m
-XX:ReservedCodeCacheSize=240m
# -XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-XX:CICompilerCount=2
-Dsun.io.useCanonPrefixCache=false
-Djava.net.preferIPv4Stack=true
-Djdk.http.auth.tunneling.disabledSchemes=""
wget --no-check-certificate -c --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/11.0.1+13/90cf5d8f270a4347a95050320eef3fb7/jdk-11.0.1_linux-x64_bin.deb
dpkg -i jdk-11.0.1_linux-x64_bin.deb
apt-get install -f
update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk-11.0.1/bin/java 11
update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk-11.0.1/bin/javac 11
update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk-11.0.1/bin/jar 11
update-alternatives --install /usr/bin/jaotc jaotc /usr/lib/jvm/jdk-11.0.1/bin/jaotc 11
update-alternatives --install /usr/bin/jarsigner jarsigner /usr/lib/jvm/jdk-11.0.1/bin/jarsigner 11
update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/jdk-11.0.1/bin/javadoc 11
@Cat7373
Cat7373 / self_update.sh
Created February 26, 2018 05:52
self update shell
#!/bin/sh
SCRIPT=$(readlink -f "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
SCRIPTNAME="$0"
ARGS="$@"
BRANCH="master"
self_update() {
cd $SCRIPTPATH
@Cat7373
Cat7373 / preprocessor_fun.h
Created March 8, 2017 16:21 — forked from aras-p/preprocessor_fun.h
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
# coding:utf-8
import base64
import hashlib
"""
Game Page: https://www.clickerheroes.com/
save: json -> base64encode -> sprinkle -> addHash
load: unsprinkle -> checkHash -> base64decode -> json
"""
class ClickerHeroesSaveDataEditor(object):