- removeNHIICC.sh : 移除健保卡元件與相關設定,須以 root (
sudo
) 權限執行。 - postinstall.sh : 官方「MAC 元件移除安裝檔」的 script 內容(2020)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3.8 | |
# requires python3.8 | |
from typing import Dict, Final | |
import hashlib | |
import os | |
import subprocess | |
# Expects a file of the format output by sha256sum (text mode) | |
CHECKSUM_FILE: Final = ".local_checksum" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First, we need to find our device. BEFORE inserting your USB drive, run the | |
# following: | |
diskutil list | |
# This will output a bunch of info about all of the disk drives connected to | |
# your Mac. Each entry will have a header in the form "/dev/diskX", where X is | |
# some number starting at 0. Now, insert your USB drive and run the command | |
# again. You should see a new entry. Make note of the name (ie, /dev/diskX). | |
diskutil list |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# To fix the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error | |
# Make sure that the .gnupg directory and its contents is accessibile by your user. | |
chown -R $(whoami) ~/.gnupg/ | |
# Also correct the permissions and access rights on the directory | |
chmod 600 ~/.gnupg/* | |
chmod 700 ~/.gnupg |
Download the latest ugw3
package from https://github.com/Lochnair/vyatta-wireguard/releases and install it on your USG using dpkg -i wireguard-ugw3-<version>.deb
.
cd /config/auth
umask 077
mkdir wireguard
cd wireguard
wg genkey > wg_private.key
wg pubkey < wg_private.key > wg_public.key
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// yarn add binary-cookies bplist-parser | |
/* | |
To get the Steamguard file, you don't necessarily need to be jailbroken, but | |
if you're jailbroken: head to | |
/private/var/mobile/Containers/Data/Application/6BE5C937-51C0-4365-811D-F2717BAD1213/Documents | |
and you can get them. I'm not sure the UUID is same on all devices, but this is the actual path | |
on my device (iOS 12) | |
If you're non-jailbroken, you need to get an unencrypted backup using iTunes, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Takes a list of commands with timing information and displays the elapsed | |
# time for each one. | |
# | |
# The input is expected to look like | |
# | |
# +1518804574.3228740692 colors:76> local k | |
# +1518804574.3228929043 colors:77> k=44 | |
# +1518804574.3229091167 colors:77> color[${color[$k]}]=44 | |
# +1518804574.3229229450 colors:77> k=33 | |
# +1518804574.3229279518 colors:77> color[${color[$k]}]=33 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Holds repositories directory | |
sudo chown -R -v git:root /var/opt/gitlab/git-data | |
sudo chmod -R -v 0700 /var/opt/gitlab/git-data | |
# Holds git repositories | |
sudo chown -R -v git:git /var/opt/gitlab/git-data/repositories | |
sudo chmod -R -v 2770 /var/opt/gitlab/git-data/repositories | |
# Holds large object directories | |
sudo chown -R -v git:gitlab-www /var/opt/gitlab/gitlab-rails/shared |