Skip to content

Instantly share code, notes, and snippets.

@jwq2011
jwq2011 / script-template.sh
Created July 5, 2023 03:46 — forked from m-radzikowski/script-template.sh
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@jwq2011
jwq2011 / For Mac 4.2.6 unlimited trial.md
Created May 4, 2023 04:10 — forked from rise-worlds/For Mac 4.2.6 unlimited trial.md
Beyond Compare 4 license for Windows, Mac, Linux

for 4.2.4 or higher, 4.2.5,4.2.6,4.3.7, it's works, this is the way which makes Always in evaluation mode.

  1. open Terminal, go to the dir : cd /Applications/Beyond Compare.app/Contents/MacOS
  2. change the name BCompare to BCompare.bak: mv BCompare BCompare.bak
  3. touch a file name BCompare , and chmod a+u BCompare : touch BCompare && chmod a+u BCompare
  4. open BCompare with text editor, insert the script :
#!/bin/bash
rm "/Users/$(whoami)/Library/Application Support/Beyond Compare/registry.dat"
"`dirname "$0"`"/BCompare.bak $@
@jwq2011
jwq2011 / Xiaomi TV hosts Part1
Last active February 8, 2021 07:26 — forked from alswl/hosts
(deprecated, I bought xiaomi VIP)hosts for OpenWRT, for disable AD in xiaomi TV
127.0.0.1 ad.mi.com
127.0.0.1 ad.xiaomi.com
127.0.0.1 ad1.xiaomi.com
127.0.0.1 app.chat.xiaomi.net
127.0.0.1 appstore.cdn.pandora.xiaomi.com
127.0.0.1 appstore.pandora.xiaomi.com
127.0.0.1 api.ad.xiaomi.com
127.0.0.1 ad.doubleclick.net
127.0.0.1 bss.pandora.xiaomi.com
127.0.0.1 b.netcheck.gallery.pandora.xiaomi.com