Skip to content

Instantly share code, notes, and snippets.

View littleq0903's full-sized avatar
🎱
Wanna see some magic?

CoColin littleq0903

🎱
Wanna see some magic?
View GitHub Profile
@littleq0903
littleq0903 / unfish.lua
Created December 8, 2023 15:20
Unfish Lua Script
-- Inspired by Corner Pin effect filter v1.1 by khaver
obs = obslua
bit = require("bit")
TEXT_FILTER_NAME = 'UnFish/Fish Lens'
TEXT_FISH_POWER = 'Strength'
SETTING_FISH_POWER = 'fish_power'
@littleq0903
littleq0903 / config.yaml
Created May 12, 2022 03:57
BBGO google-cloud-ops-agent config.yaml
logging:
receivers:
bbgo:
type: files
include_paths:
- /var/log/bbgo.log
processors:
bbgo_proc:
type: parse_regex
field: msg
@littleq0903
littleq0903 / AutoClaimItchIo.js
Last active June 13, 2020 23:11
Automatically claim games on itch.io, powered by ScriptAutoRunner Chrome extension
var currentUrl = window.location.toString();
console.log(currentUrl);
if (currentUrl.includes("/download/") && !currentUrl.includes("/bundle/")) {
window.history.back();
}
else if (currentUrl.includes("/bundle/download/"))
{
if ($('[value="claim"]') && $('[value="claim"]')[0]) {
$('[value="claim"]')[0].click();
@littleq0903
littleq0903 / default.custom.yaml
Last active April 2, 2020 21:04
中州韻輸入法引擎設定檔
customization:
distribution_code_name: Weasel
distribution_version: 0.9.30
generator: "Rime::SwitcherSettings"
modified_time: "Mon Feb 05 11:56:51 2018"
rime_version: 1.1.2
patch:
"schema_list":
- schema: double_pinyin_mspy_tw
- schema: bopomofo_tw
@littleq0903
littleq0903 / .gitconfig
Created May 8, 2019 21:01
My git alias collection
[alias]
fetchmaster = fetch origin master:master
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
br = for-each-ref --count=10 --sort=-committerdate refs/heads/ --format=%(refname:short)
br30 = for-each-ref --count=30 --sort=-committerdate refs/heads/ --format=%(refname:short)

On master and nodes

Pull images form internet access laptop

docker pull gcr.io/google_containers/kube-apiserver-amd64:v1.5.0
docker pull gcr.io/google_containers/kube-controller-manager-amd64:v1.5.0
docker pull gcr.io/google_containers/kube-proxy-amd64:v1.5.0
docker pull gcr.io/google_containers/kube-scheduler-amd64:v1.5.0
docker pull weaveworks/weave-npc:1.8.2
docker pull weaveworks/weave-kube:1.8.2
{"swagger":"2.0","info":{"version":"v1","title":"Lego Unified API"},"host":"lego","schemes":["http"],"paths":{"/api/draco":{"get":{"tags":["Draco"],"summary":"Query jobs","description":"Paged results with defualt page size ($top) 50 with a maximum of 1000. Supports OData query options like...<br /><code>?<span class=\"text-primary\">$count</span>=<span class=\"text-danger\">true</span>&amp;<span class=\"text-primary\">$skip</span>=<span class=\"text-danger\">10</span>&amp;<span class=\"text-primary\">$top</span>=<span class=\"text-danger\">20</span>&amp;<span class=\"text-primary\">$select</span>=<span class=\"text-danger\">Id,Type,Status</span>&amp;<span class=\"text-primary\">$filter</span>=<span class=\"text-danger\">Status eq 'OnGoing' or Status eq 'Start'</span>&amp;<span class=\"text-primary\">$orderby</span>=<span class=\"text-danger\">DateStart desc</span></code>","operationId":"Draco_GetJobs","consumes":[],"produces":["application/json","text/json"],"parameters":[{"name":"$filter","in":"query","descr
__author__ = "Eric Chu <[email protected]>"
import operator as op
class KMTer(int):
def __add__(self, a, b):
return op.mul(a, b)
import math
cache = {}
low = 1
def f(n, squares):
global low
if n in squares:
return [n]
class Solution:
# @param beginWord, a string
# @param endWord, a string
# @param wordDict, a set<string>
# @return an integer
def is_intermediate(self, a, b):
return len(filter(lambda x: x, [a[i] != b[i] for i in range(len(a))])) == 1
def dfs(self, themap, start, end, limit):
if limit <= 0: