Skip to content

Instantly share code, notes, and snippets.

View geoffmyers's full-sized avatar

Geoff Myers geoffmyers

View GitHub Profile
@geoffmyers
geoffmyers / cloudflare-ddns.sh
Last active October 8, 2017 02:53
Cloudflare Dynamic DNS Simple Update Script
#!/usr/local/bin/zsh
IP_ADDRESS=$(curl ipecho.net/plain ; echo)
curl -X PUT "https://api.cloudflare.com/client/v4/zones/{zone_identifier}/dns_records/{identifier}" \
-H "X-Auth-Email: {cloudflare_email_address}" \
-H "X-Auth-Key: {cloudflare_api_key}" \
-H "Content-Type: application/json" \
--data "{\"type\":\"A\",\"name\":\"{domain_name}\",\"content\":\"$IP_ADDRESS\"}"
@geoffmyers
geoffmyers / default-apps.duti
Last active April 10, 2019 18:41
Default Handlers for Extensions and Protocols
# **************************************************
# Default Handlers for Extensions and Protocols
# Last Updated by Geoff Myers on June 28, 2018
# **************************************************
# **************************************************
# Extensions - Default Handlers
# **************************************************
# Apple Archive Utility
@geoffmyers
geoffmyers / liquidctl.2s.sh
Last active March 29, 2021 18:46
Liquidctl BitBar Plugin
#!/usr/local/bin/zsh
LIQUIDCTL="/usr/local/bin/liquidctl"
STATUS=$($LIQUIDCTL status)
LIQUID_TEMP=$(echo $STATUS | grep "Liquid temperature" | egrep -o "[0-9]{2,3}")
FAN_RPM=$(echo $STATUS | grep "Fan speed" | egrep -o "[0-9]{3,4}")
PUMP_RPM=$(echo $STATUS | grep "Pump speed" | egrep -o "[0-9]{3,4}")
if [[ "$1" = "color" ]]; then
if [[ "$4" ]]; then
@geoffmyers
geoffmyers / css-units-best-practices.md
Created February 7, 2023 14:59 — forked from basham/css-units-best-practices.md
CSS Units Best Practices

CSS units

Recommendations of unit types per media type:

Media Recommended Occasional use Infrequent use Not recommended
Screen em, rem, % px ch, ex, vw, vh, vmin, vmax cm, mm, in, pt, pc
Print em, rem, % cm, mm, in, pt, pc ch, ex px, vw, vh, vmin, vmax

Relative units

Relative units