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
### https://marcelotduarte.github.io/cx_Freeze/ | |
### https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/ | |
python3 -m venv .venv | |
source .venv/bin/activate | |
pip install --upgrade cx_Freeze | |
### for appimage https://cx-freeze--2050.org.readthedocs.build/en/2050/setup_script.html#bdist-appimage |
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
#!/bin/sh | |
echo "for each ping that fails, adds one line to csv log file with iso-8601 date and host" | |
echo "Usage: ./pinglog.sh host-to-ping i.e. ./pinglog.sh google.com " | |
# to do: if continually fails, don't log each failure, just start and stop of failures. | |
# i guess something like if previous fail was less than X secs from current, don't log. | |
while true ; | |
do | |
# change -I arg from wlan1 to whatever interface you want to use | |
ping -c1 -I wlan1 $1 > /dev/null | |
### ping -n 1 $1 > /dev/null ### for windows with gitbash (see comment below) |
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
## In 2022 I bought a 1tb used SSD on ebay. I needed to add two lines to drivedb.h so smartctl would find it info for it: | |
cat << EOF | |
### Add two lines to drivedb.sh shown with (+) in diff output below. | |
### after adding the 2 lines, your diff output should be similar | |
### bash-3.2$ diff -C drivedb-oem.h drivedb-owc.h | |
"OWC Aura Pro( 6G SSD)?|" // tested with OWC Aura Pro 6G SSD/507ABBF0, OWC Aura Pro/603ABBF0 | |
"OWC Mercury Electra (Pro )?[36]G SSD|" // tested with | |
// OWC Mercury Electra 6G SSD/502ABBF0, OWC Mercury Electra Pro 3G SSD/541ABBF0 | |
+ "OWC Mercury Extreme Pro 6G|" // tested with |
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
echo " reinstall all patches and rebuild kext first. I did not reboot. YMMV " | |
open /Applications/Utilities/Patch\ Updater.app | |
echo " warning... this will delete all chome profiles! You'll have to sign in and re-sync." | |
mv ~/Applications/Chrome\ Apps.localized/ /tmp/ | |
mv ~/Application\ Support/Google/ /tmp | |
mv ~/Library/Google /tmp | |
rm -rf /Library/Google | |
rm -rf /Library/Application\ Support/Google | |
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --disable-gpu chrome://extensions |
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
#!/bin/zsh | |
# Based on https://indiespark.top/software/detecting-apple-silicon-shell-script/ | |
arch_name="$(uname -m | cut -c 1-3)" # x86 or arm (to match arm64 or arm64e) | |
echo -n ${arch_name} "= specifically " | |
uname -m | |
if [ "${arch_name}" = "x86" ]; then | |
if [ "$(sysctl -in sysctl.proc_translated)" = "1" ]; then | |
echo "Running on Rosetta 2" | |
else | |
echo "Running on native Intel" |
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
Battery0: ${battery_percent BAT0}% ${alignr}${color8}${battery_bar 8,70 BAT0} | |
Battery1: ${battery_percent BAT1}% ${alignr}${color8}${battery_bar 8,70 BAT1} | |
]] |
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
Current sensor connector | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Header | S10B-MECK-2GA-A | |||||||||
Wire | Blue | Green | Yellow | Black | Red | |||||
Pin | 1 | 2 | 3 | 4 | 5 | |||||
Name | Cur C | Cur B | Cur A | GND | VCC | |||||
2.85mV/A offset 1/2 VCC | 5V | |||||||||
Wire | Blue | Green | Yellow | Black | Red | |||||
Pin | 6 | 7 | 8 | 9 | 10 | |||||
Name | Cur C | Cur B | Cur A | GND | VCC |
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 bash | |
### https://manpages.debian.org/testing/seetxt/seeman.1.en.html | |
touch ~/seefilelist | |
touch ~/seedata | |
if [ ! -f ~/.seeconfig ]; then | |
echo "text font: helvetica 12" >> ~/.seeconfig | |
echo "filelist: /home/$USER/seefilelist" >> ~/.seeconfig | |
echo "seedata: /home/$USER/seedata" >> ~/.seeconfig | |
echo "dimensions: 900 600" >> ~/.seeconfig | |
fi |
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
dscl . -create /Users/tts-setup NFSHomeDirectory /Local/Users/tts-setup | |
dscl . -passwd /Users/tts-setup xxxxxxxx | |
dscl . -append /Groups/admin GroupMembership tts-setup | |
id tts-setup | |
### uid=1007(tts-setup) gid=80(admin) groups=80(admin),12(everyone),61(localaccounts)... | |
mdfind "kMDItemExecutableArchitectures == '*i386*' && kMDItemExecutableArchitectures != '*x86*'" |
NewerOlder