Skip to content

Instantly share code, notes, and snippets.

View League2EB's full-sized avatar
🏠
Working from home

League2EB

🏠
Working from home
View GitHub Profile
@League2EB
League2EB / Mac OS Mojave Language Switcher (+ more) Dark Menu Bar Fix.txt To fix the language switcher and other stuff like the notifications and Spotlight in Mac OS with hybrid dark mode (dark menu bar and light theme apps), do this.
To fix the language switcher and other stuff like the notifications and Spotlight in Mac OS with hybrid dark mode (dark menu bar and light theme apps), do this:
defaults write com.apple.HIToolbox NSRequiresAquaSystemAppearance -bool no
defaults write com.apple.notificationcenterui NSRequiresAquaSystemAppearance -bool no
defaults write com.apple.menuextra.textinput NSRequiresAquaSystemAppearance -bool no
defaults write com.apple.TISwitcher NSRequiresAquaSystemAppearance -bool no
defaults write com.apple.Spotlight NSRequiresAquaSystemAppearance -bool no
1) stop services:
sudo systemctl stop hassio-supervisor.service
sudo systemctl stop hassio-apparmor.service
2) disable services:
sudo systemctl disable hassio-supervisor.service
sudo systemctl disable hassio-apparmor.service
3) remove services:
sudo rm -rf /etc/systemd/system/hassio-supervisor.service
@League2EB
League2EB / 台灣身分證認證.swift
Created July 29, 2020 18:58 — forked from 5SMNOONMS5/台灣身分證認證.swift
台灣身分證認證 程序 (支援 swfit 4, 4.2)
import Foundation
//A 台北市 J 新竹縣 S 高雄縣
//B 台中市 K 苗栗縣 T 屏東縣
//C 基隆市 L 台中縣 U 花蓮縣
//D 台南市 M 南投縣 V 台東縣
//E 高雄市 N 彰化縣 W 金門縣
//F 台北縣 O 新竹市 X 澎湖縣
//G 宜蘭縣 P 雲林縣 Y 陽明山
//H 桃園縣 Q 嘉義縣 Z 連江縣
@League2EB
League2EB / RxRealmDelete.swift
Created June 4, 2020 03:40
RealmSwift + Rx
func delete<T>(type: T.Type, code: String) -> Observable<()> where T: Object {
return Observable.create { observer in
do {
let realm = try Realm()
guard let object = realm.objects(type).filter(code).first else { return Disposables.create() }
realm.delete(object)
observer.onNext(())
observer.onCompleted()
} catch let error {
observer.onError(error)
@League2EB
League2EB / default.conf
Last active June 1, 2020 02:09
443Port設定檔案
## 替換以下的「mdfk.com」為您自己的網域名稱
## 替換以下的「mdfk.com」為您自己的網域名稱
## 替換以下的「mdfk.com」為您自己的網域名稱
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name www.mdfk.com mdfk.com;