Skip to content

Instantly share code, notes, and snippets.

View alxtz's full-sized avatar
🙀
Working on a shotgun surgery.

Alex Tzeng alxtz

🙀
Working on a shotgun surgery.
View GitHub Profile
# 參考了
- https://leetcodethehardway.com
- https://leetcode.com/explore/
- neetcode.io
- https://www.lintcode.com/course/43
- https://hackmd.io/@arthurzllu/SkZBc7GoI#Analysis-of-Algorithms
- https://aaronice.gitbook.io/lintcode/backtracking/subsets
- https://space.bilibili.com/386952786/video?tid=0&pn=3&keyword=&order=pubdate
- https://www.lintcode.com/discuss/597/
const Event /* OrderProcessingEvents */ = {
REQUESTED: "REQUESTED",
PAYMENT_REQUESTED: "PAYMENT_REQUESTED",
PAYMENT_REJECTED: "PAYMENT_REJECTED",
REPLY_PAYMENT_FAILED: "REPLY_PAYMENT_FAILED",
REPLY_PAYMENT_COMPLETED: "REPLY_PAYMENT_COMPLETED",
};
const OrderState = {
INITIATED: "INITIATED",
# Reach out to the following teams before making any
# structural changes to this file as it's used for
# downstream reporting:
# - People Team
# - Data Team
- country: United States
area: Connecticut
locationFactor: 70.0
- country: United States
@alxtz
alxtz / bg-search-en.js
Last active March 11, 2021 16:17
Nightbot script to fetch HSBG ranks
!commands add -cd=5 !ap
$(eval
let api = $(urlfetch json https://playhearthstone.com/en-us/api/community/leaderboardsData?region=AP&leaderboardId=BG&seasonId=2);
let r = api.leaderboard.rows;
let q = "$(1)";
let rest = q.substring(1, q.length);
let f = q[0] === '#' ? r[parseInt(rest) - 1] : r.find(u => u.accountid.toUpperCase() === q.toUpperCase());
f === undefined ? `[$(user)]: ${q} not found` : `[$(user)]: ${f.accountid} is currently #${f.rank}, ${f.rating} mmr`;
)
@alxtz
alxtz / custom.css
Last active February 9, 2021 22:44
custom.css
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400&display=swap');
body {
font-family: 'Noto Sans TC', sans-serif !important;
}
@alxtz
alxtz / bg-search.js
Last active March 30, 2022 05:43
其實不是什麼高深的東西,給大家複製來自己改,有語法問題可以問 twitch: alex_tzeng
!commands edit -cd=5 !亞服
$(eval
let api = $(urlfetch json https://playhearthstone.com/en-us/api/community/leaderboardsData?region=AP&leaderboardId=BG&seasonId=3);
let r = api.leaderboard.rows;
let q = "$(1)";
let rest = q.substring(1, q.length);
let f = q[0] === '#' ? r[parseInt(rest) - 1] : r.find(u => u.accountid.toUpperCase() === q.toUpperCase());
f === undefined ? `[$(user)]: ${q} 不在亞服排行榜,沒料` : `[$(user)]: ${f.accountid} 目前亞服 #${f.rank},${f.rating}分`;
)
@alxtz
alxtz / cc.diff
Created November 18, 2019 03:48
git diff GitHub/develop...feature/migrate_dashboard_with_external_modules -- . ':(exclude)*/legacy/*' ':(exclude)*.lock' ':(exclude)*/dist/*'
diff --git a/app/javascript/components/pages/DashboardView/index.js b/app/javascript/components/pages/DashboardView/index.js
index daf195608..94b5721a6 100644
--- a/app/javascript/components/pages/DashboardView/index.js
+++ b/app/javascript/components/pages/DashboardView/index.js
@@ -1 +1,3 @@
-export { default } from './DashboardView'
+import { Dashboard } from 'xfers-dashboard'
+
+export default Dashboard
diff --git a/client_app/packages/xfers-dashboard/.gitignore b/client_app/packages/xfers-dashboard/.gitignore
@alxtz
alxtz / App.js
Last active October 18, 2019 08:58
sample react component
import React from 'react'
class App extends React.Component {
// NOTE common fields
static propTypes = {
}
static defaultProps = {
}
module.exports = {
config: {
fontSize: 16,
fontFamily: 'OperatorMono Nerd Font',
fontWeight: 'bold',
cursorShape: 'BLOCK',
cursorBlink: false,
// color of the text
foregroundColor: '#c4c8c6',
// terminal background color