Skip to content

Instantly share code, notes, and snippets.

View hansen033's full-sized avatar

Hansen hansen033

  • Taiwan
View GitHub Profile
@hansen033
hansen033 / rt mart.cpp
Last active June 9, 2018 13:33
2018/4/19
#include<iostream>
#include<math.h>
using namespace std;
int main(){
cout << "How many product are you going to buy in RT-Mart?";
int product;
cin >> product;
int p[product];
for(int t = 0 ; t < product ; t++){
cout << "What is the NO." << t + 1 << " product price?";
@hansen033
hansen033 / tokenPaymentBanks.md
Last active January 2, 2023 17:46 — forked from HenryYang/tokenPaymentBanks.md
在台灣的手機感應 VISA/MASTER/JCB 卡支援銀行對照表

對應表

銀行/支付系統 Apple Pay Google Pay Samsung Pay Garmin Pay Fitbit Pay 台灣行動支付 Hami Pay 支援家數
國泰世華銀行 6
國泰世華銀行 - 金融卡 6
中國信託銀行 7
中國信託銀行 - 金融卡 4
台新國際商業銀行 7
台新國際商業銀行 - 金融卡 6
聯邦銀行 6
@hansen033
hansen033 / AdGuard_DoH_Windows.md
Last active October 27, 2023 11:19 — forked from krcm0209/README.md
Using AdGuard DNS over HTTPS (DoH) on Windows 11 with updated domain

Why

You may want to use AdGuard's DNS over HTTPS[^2] service if you

  1. Want to make it harder for your ISP to know what websites you are requesting (DoH part)
  2. Want to block most traditional ads from your web browsing experience across your entire PC (AdGuard DNS part)
  3. Want to block some malicious site and malware. (AdGuard DNS part)

Setup instructions

@hansen033
hansen033 / ntpc_lib_random_books.py
Created February 10, 2024 13:18
Open 5 random books in New Taipei City Library WEBPAC
import random
import requests
from bs4 import BeautifulSoup
import webbrowser
def get_random_mid():
# Generate a random number under 2000000
# 1107787 is the biggest known entry
return random.randint(0, 2000000)
import rotatescreen # pip install rotate-screen
# ANSI escape code
class terco:
BL = '\033[0m' # Black
RD = '\033[91m' # Bright Red
BM = '\033[95m' # Bright Magenta
def print_displays_info(displays):
print(f'There are {terco.RD}{len(displays)}{terco.BL} available displays:')