Skip to content

Instantly share code, notes, and snippets.

View hermanho's full-sized avatar

Herman Ho hermanho

  • London
  • 18:14 (UTC)
View GitHub Profile
@hermanho
hermanho / concurrent_task_progress_bar.ipynb
Created April 18, 2024 21:21 — forked from nikhilkumarsingh/concurrent_task_progress_bar.ipynb
Displaying Progress Bar for Concurrent Tasks
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hermanho
hermanho / uk_public_holidays.py
Created February 25, 2024 01:47 — forked from dogsbody/uk_public_holidays.py
UK public holidays in Python
from dateutil import rrule
from datetime import date, timedelta, datetime
def get_holidays(a=date.today(), b=date.today()+timedelta(days=365)):
rs = rrule.rruleset()
# Include all potential holidays
rs.rrule(rrule.rrule(rrule.YEARLY, dtstart=a, until=b, bymonth= 1, bymonthday= 1)) # New Years Day
rs.rrule(rrule.rrule(rrule.YEARLY, dtstart=a, until=b, bymonth= 1, bymonthday= 2, byweekday=rrule.MO)) # New Years Day
@hermanho
hermanho / App.js
Created December 25, 2022 03:44 — forked from mohitPassan/App.js
Custom hook to enable callback function for hooks
import { useStateWithCallback } from "./useStateWithCallback";
const App = () => {
const [bananas, setBananas] = useStateWithCallback(0);
const eatMore = () => {
setBananas(bananas + 1, (prevValue, newValue) => {
console.log(newValue);
});
};
import 'package:flutter/material.dart';
import 'dart:math' show pi;
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
@hermanho
hermanho / donate_crack.md
Created March 27, 2022 00:46 — forked from stu43005/donate_crack.md
[Cracked] Checker Plus for Gmail

破解 Checker Plus for Gmail 的 donate 功能限制

步驟

  1. 找到該 Extension 的 ID (通常從 Chrome WebStore 安裝的皆為oeopbcgkkoapgobdbedcemjljbihmemj)
  2. 訪問以下網址 chrome-extension://[ExtensionID]/donate.html?action=coinbaseSuccess
  • 帶入預設ID則為 chrome-extension://oeopbcgkkoapgobdbedcemjljbihmemj/contribute.html?action=coinbaseSuccess
  1. 破解完成~
@hermanho
hermanho / gist:a9dc09cf665f6b3a3c349676c73605d9
Created September 12, 2020 17:41
asus rt-ac86u region vs wireless channel
# https://www.snbforums.com/threads/asus-rt-ac86u-dual-band-ac2900-wireless-router-reviewed.42195/page-9#post-412345
Region/Channels 1-11 12-13 36-48 52-64 100-112 116 132-140 149-161 165
Asia............ x ...---... x ...---....---...---...---..... x ... x
China(Default).. x ... x ...---...---....---...---...---..... x ... x
Europe.......... x ... x ... x ... x .... x ... x ... x .....---...---
Korea........... x ... x ... x ...---....---...---...---..... x ...---
Russia.......... x ... x ... x ... x .... x ... x ... x .....---...---
Singapore....... x ...---... x ...---....---...---...---..... x ... x
United States... x ...---... x ...---....---...---...---..... x ... x
@hermanho
hermanho / Contributions.md
Last active March 29, 2020 19:55
Contributions

thegreatsuspender / update zh_TW translation

greatsuspender/thegreatsuspender#880

VoTT / fix: test asset distribution to include all tags on test/train split

microsoft/VoTT#823

aspnetcore / Fix subscription callbacks when unsubscribe in AuthorizeService.js in React template

@hermanho
hermanho / PV_PVC.yaml
Last active April 29, 2019 08:22
Azure Kubernetes azureFile with Symlinks
apiVersion: v1
kind: PersistentVolume
metadata:
name: pv-azure-file-share
labels:
pv-type: azure-file-share
spec:
capacity:
storage: 100Mi
accessModes:
2018-07-15 16:18:04,503 +0800 INFO pid=4836 8080:MainThread logging_config.py:362 OS: Windows/10.0 [64-bit]
2018-07-15 16:18:04,503 +0800 INFO pid=4836 8080:MainThread logging_config.py:366 備份與同步處理 [64-bit] (build 3.42.9858.3671)
2018-07-15 16:18:04,503 +0800 INFO pid=4836 8080:MainThread logging_config.py:367 SSL: OpenSSL 1.0.2o 27 Mar 2018
2018-07-15 16:18:04,505 +0800 INFO pid=4836 8080:MainThread main.py:285 Browser emulation mode for googledrivesync.exe already set to 11001
2018-07-15 16:18:04,507 +0800 ERROR pid=4836 8080:MainThread main.py:339 Unexpected exception during startup.
Traceback (most recent call last):
File "windows\main.py", line 335, in Main
File "windows\main.py", line 408, in LaunchApp
File "windows\main.py", line 159, in RegisterCustomFileTypes
File "windows\storage\registry.py", line 184, in SetValue
@hermanho
hermanho / install.sh
Last active February 20, 2023 15:55 — forked from jaidetree/supervisor
This is an init.d/supervisor script for managing a easy_install \ pip install version of supervisor. Add the first file "supervisor" into /etc/init.d/supervisor and put "supervisord.conf" into /etc/supervisor/supervisord.conf
systemctl enable supervisord
systemctl start supervisord
systemctl status supervisord