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
# Apple Silicon laptops with firmware > 13.0 have a native charge threshold that does not required any userspace daemon running. | |
# This native limit works even when the laptop is sleeping or powered off therefore it is preferable to the userspace daemon. | |
# Nonetheless, it only works with fixed thresholds (80% as upper limit and 70% as lower limit). | |
# CHWA key is the one used to enable/disable the native limit. 01 = 80% limit, 00 = no limit | |
## | |
typeset -g smc_command="/usr/local/bin/smc" | |
typeset -g smc_charge_limit_key="CHWA" | |
typeset -g smc_charge_limit_status_on="01" | |
typeset -g smc_charge_limit_status_off="00" |
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
// ==UserScript== | |
// @name ChatGPT Hotkeys | |
// @description Refresh and Navigate ChatGPT | |
// @include https://chat.openai.com/* | |
// ==/UserScript== | |
(function () { | |
var url = 'https://chat.openai.com/?model=gpt-4'; | |
var currentIndex = -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
[ | |
"94.24.16.0/21", | |
"46.34.160.0/19", | |
"130.244.71.74/32", | |
"185.214.36.0/22", | |
"188.214.120.0/23", | |
"46.38.156.0/22", | |
"185.103.128.0/22", | |
"109.122.192.0/18", | |
"188.210.96.0/19", |
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
function toggleFocus(focus) { | |
const app = Application("System Preferences") | |
const pane = app.panes.byId("com.apple.preference.notifications").anchors.byName("Focus") | |
app.reveal(pane) // Open the preference pane | |
// Useful way of inspecting the UI hierarchy of an open app: | |
// Application("System Events").applicationProcesses.byName("System Preferences").entireContents() | |
const ui = Application("System Events").applicationProcesses.byName("System Preferences").windows.byName("Notifications & Focus").tabGroups.at(0) |
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
## See latest version at https://github.com/NightMachinary/.shells/blob/master/scripts/zshlang/auto-load/others/github.zsh | |
## Usage: | |
# $ gh-release-get "creationix/nvm" | |
## | |
alias ec='print -r --' | |
function gh-release-get() { | |
local repo="$1" | |
local releases | |
releases="$(curl -s https://api.github.com/repos/"$repo"/releases)" |
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/local/Cellar/gcc/10.2.0/bin/gcc-10 sh2bin.c -s -ldl -DSRC=foo.sh -o foo -v 126 | |
Using built-in specs. | |
COLLECT_GCC=/usr/local/Cellar/gcc/10.2.0/bin/gcc-10 | |
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/10.2.0/libexec/gcc/x86_64-apple-darwin19/10.2.0/lto-wrapper | |
Target: x86_64-apple-darwin19 | |
Configured with: ../configure --build=x86_64-apple-darwin19 --prefix=/usr/local/Cellar/gcc/10.2.0 --libdir=/usr/local/Cellar/gcc/10.2.0/lib/gcc/10 --disable-nls --enable-checking=release --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-10 --with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr --with-mpc=/usr/local/opt/libmpc --with-isl=/usr/local/opt/isl --with-system-zlib --with-pkgversion='Homebrew GCC 10.2.0' --with-bugurl=https://github.com/Homebrew/homebrew-core/issues --disable-multilib --with-native-system-header-dir=/usr/include --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk SED=/usr/bin/sed | |
Thread model: posix | |
Supported LTO com |
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
/Users/evar/my-music/Songs/Motion Picture's Soundtracks/More/Cécile Corbel - The Secret World Of Arrietty OST [FLAC]/20 - Cécile Corbel - Arrietty's Song (original Japanese version).flac |
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
Hi, Alice! | |
OOOo | |
yay |
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
Hi Alice! |
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
(( $+functions[dvar] )) || function dvar() { | |
local pre='' | |
test -z "$2" || pre="CODE $2 | " | |
echo "$pre$(typeset -p "$1" 2>&1)" | |
echo "$pre$1 in env: $(printenv "$1")" | |
} | |
localesc() { | |
echo Innocence | |
} | |
tlocalesc() { |
NewerOlder