Skip to content

Instantly share code, notes, and snippets.

View hermanho's full-sized avatar

Herman Ho hermanho

  • London
  • 11:50 (UTC +01:00)
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 / 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