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 | |
collar=myCollarId # replace this! | |
days=1 | |
charging=no | |
if [[ $1 = "gsm" ]]; then | |
script="db_output_gsm.php" | |
else | |
script="db_output.php" |
Use these together with https://redsweater.com/fastscripts/ for global hotkey goodness in macOS
Requirements:
brew install fastscripts
Download all the scripts and put them in ~/Library/Scripts/
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 | |
# | |
# Reads AirTag data from the FindMy.app cache and converts it to a daily GPX file | |
# | |
# Rsyncs the data to a web accessible folder that can be displayed with e.g. | |
# https://gist.github.com/henrik242/84ad80dd2170385fe819df1d40224cc4 | |
# | |
# This should typically be run as a cron job | |
# |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>GPX track</title> | |
<script src="//polyfill.io/v3/polyfill.min.js?features=document.querySelector%2CArray.prototype.at"></script> | |
<script src="//cdn.jsdelivr.net/gh/Luuka/GPXParser.js/dist/GPXParser.min.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.0/leaflet.min.js"></script> | |
<script src="//cdn.jsdelivr.net/gh/iosphere/Leaflet.hotline/dist/leaflet.hotline.min.js"></script> | |
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.0/leaflet.css" /> |
Scuba tank size and buoyancy calculator, hosted at https://henrik.synth.no/scuba/tanks.html
Tired of typing your password for sudo? TouchID to the rescue!
brew install gnu-sed
sudo wget -O /usr/local/bin/fix-sudo https://gist.githubusercontent.com/henrik242/de6950822325399fa2e55b311dfe46ce/raw/fix-sudo
sudo chmod 755 /usr/local/bin/fix-sudo
echo 'grep -q pam_tid /etc/pam.d/sudo || echo PLEASE RUN fix-sudo' >> ~/.bash_profile
echo 'grep -q pam_tid /etc/pam.d/sudo || echo PLEASE RUN fix-sudo' >> ~/.zshrc
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
<html> | |
<head> | |
<title>Mandelbrot Set</title> | |
</head> | |
<body> | |
<canvas id="canvas" width="1200" height="800"></canvas> | |
<script> | |
// Prompt: | |
// Create a zoomable mandelbrot set with pretty colors in javascript and html, | |
// without using external libraries. It should recalculate the mandelbrot on every zoom. |
OlderNewer