- removeNHIICC.sh : 移除健保卡元件與相關設定,須以 root (
sudo
) 權限執行。 - postinstall.sh : 官方「MAC 元件移除安裝檔」的 script 內容(2020)
This file contains 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
# ripgrep is required | |
codesign -dr - ~/Applications/*.app 2>&1 \ | |
| rg --pcre2 -o '(?<=identifier ")com.jetbrains[^"]+(?=")' \ | |
| xargs -L 1 -I _ defaults read _ ApplePressAndHoldEnabled |
This file contains 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 zsh | |
ORIG_BRANCH="$(git rev-parse --abbrev-ref HEAD)" | |
if [[ "$ORIG_BRANCH" == "HEAD" ]] { | |
ORIG_BRANCH="$(git rev-parse --short HEAD)" | |
} | |
for b in $(git branch --track | grep -v 'detached' | sed 's/*//') | |
do | |
git checkout "${b}" |
This file contains 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
var AWS = require('aws-sdk'); | |
var chain = new AWS.CredentialProviderChain(); | |
var credentials | |
AWS.CredentialProviderChain.defaultProviders = [ | |
function () { return new AWS.EnvironmentCredentials('AWS'); }, | |
function () { return new AWS.EnvironmentCredentials('AMAZON'); }, | |
function () { return new AWS.SharedIniFileCredentials({profile: 'my_profile_name'}); }, | |
function () { return new AWS.EC2MetadataCredentials(); } | |
] |
This file contains 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
""" | |
modified for Python 2.7 and unicode | |
get your goup id at https://lookup-id.com/ | |
get your acess token at https://developers.facebook.com/tools/explorer/ | |
fork from | |
fbfeed2csv: a tool to download all posts from a user/group/page's facebook feed to a csv file | |
yuzawa-san | |
https://github.com/yuzawa-san | |
""" |
This file contains 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 zsh | |
# Copied from https://github.com/paulirish/dotfiles/commit/6743b907ff586c28cd36e08d1e1c634e2968893e | |
function strip_diff_leading_symbols(){ | |
color_code_regex=$'(\x1B\\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K])' | |
# simplify the unified patch diff header | |
sed -E "s/^($color_code_regex)diff --git .*$//g" | \ | |
sed -E "s/^($color_code_regex)index .*$/\ | |
\1$(rule)/g" | \ |
This file contains 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
/* modified from https://github.com/bitcoin/bitcoin/issues/4147#issuecomment-42493883 */ | |
try { | |
std::locale(""); | |
} catch (const std::runtime_error& e) { | |
setenv("LC_ALL", "C", 1); | |
} |
This file contains 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
class To{}; | |
#include <utility> | |
class From{ | |
public: | |
/* This will cause compilation error under Clang (3.5) with c++11 standard */ | |
operator const To() { return To(); } |
This file contains 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
A helper function to dump backtrace in more accurate information | |
with helper script to translate dumped address to source code line. |
This file contains 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
diff --git a/Library/Formula/libnice.rb b/Library/Formula/libnice.rb | |
index 3964b17..89a1f34 100644 | |
--- a/Library/Formula/libnice.rb | |
+++ b/Library/Formula/libnice.rb | |
@@ -5,6 +5,8 @@ class Libnice < Formula | |
url "http://nice.freedesktop.org/releases/libnice-0.1.7.tar.gz" | |
sha1 "94d459fc409da9cf5e4ac30d680ee6c0ded2cb64" | |
+ option "without-gstreamer" | |
+ |
NewerOlder