Skip to content

Instantly share code, notes, and snippets.

View ayn's full-sized avatar
🍉
wfh

Andrew Ng ayn

🍉
wfh
View GitHub Profile
@ayn
ayn / water-chemistry-calculator.html
Last active February 27, 2026 10:25
water-chemistry-calculator by ryan m
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Water Chemistry Calculator</title>
<style>
* {
margin: 0;
padding: 0;
@ayn
ayn / israel boycott list.md
Created September 13, 2025 02:26
Israel Boycott List 🇵🇸🍉

Boycott List

1. BDS Priority & Endorsed Targets

Companies explicitly highlighted by the official BDS Movement as current campaign priorities, or widely endorsed grassroots targets.

  • AXA (insurance, linked to Israeli banks/arms; under pressure until divestment is verified)
  • HP (Hewlett Packard Inc / HPE) (provides digital infrastructure for Israeli government and military)
  • Siemens (EuroAsia Interconnector project)
  • Microsoft / Xbox (cloud & gaming partnerships with Israeli forces)
  • Airbnb (tourism in settlements)
@ayn
ayn / micra_lunar_ha_automation.yaml
Last active October 29, 2026 00:03
brew by weight automation (micra x lunar x homeasistant)
# Micra + Acaia Lunar brew by weight, exported from the current automation.
# Replace binary_sensor.micra_brewing_active and switch.micra with your entities.
# switch.micra must be the machine power control, not a pump-only switch.
# Required scale entities: sensor.lunar_weight (g),
# sensor.lunar_volume_flow_rate (HA reports mL/s; treated as approximately g/s).
# Required helpers: input_number.spro_target_weight (g),
# input_number.spro_cutoff_offset (SECONDS of lead time, not grams).
# Required mode helper: input_boolean.micra_soup_mode (on = Soup, off = Spro).
# Set target yield separately, e.g. 80g for Soup or 45g for Spro.
# Current lead time is 2.5 seconds, configured in spro_cutoff_offset.
@ayn
ayn / .ruby-version
Last active July 12, 2024 06:10
update dnsmadeeasy dualstack IPs
ruby-3.3.4
@ayn
ayn / coffee.md
Last active August 12, 2026 13:55
coffee gears ☕️
@ayn
ayn / df.sh
Last active March 5, 2024 00:04 — forked from chockenberry/df.sh
df Replacement
#!/bin/sh
if [ ! -z "$*" ]; then
echo "this is ~/bin/df, use /bin/df"
exit 1
fi
protect=`mount | grep -v "read-only" | grep "protect" | cut -f 3 -w`
nosuid=`mount | grep -v "read-only" | grep "nosuid" | sed -n 's/.*\(\/Volumes\/.*\) (.*/\1/p' | sed 's/[[:space:]]*$//' | sed 's/.*/"&"/'`
@ayn
ayn / gist:b0718025f76f713b906955133380fc32
Created September 6, 2023 16:46
stroller runs total
[ayn@aynStudio strava ]$ be ./stroller-total.rb
Stroller Test Run: 5.2 miles, https://www.strava.com/activities/801750547
Windy stroller jog: 6.0 miles, https://www.strava.com/activities/803998550
Jog to Dolores Park w/ Miles in stroller: 1.7 miles, https://www.strava.com/activities/805911416
Stroller jog: 8.0 miles, https://www.strava.com/activities/807410276
6 miles with Miles (stroller): 6.0 miles, https://www.strava.com/activities/808947004
Stroller jog: 8.0 miles, https://www.strava.com/activities/815224565
Stroller run in the sun: 6.1 miles, https://www.strava.com/activities/822501706
Stroller run: 8.0 miles, https://www.strava.com/activities/823428636
@ayn
ayn / MY accessories.md
Last active July 29, 2026 13:06
Tesla Model Y accessories (✅ = copped)

2025 Tesla Model Y (Juniper)

Charging

  • JOWUA J1772 → CCS2 AC Adapter Pro

Display

  • JOWUA Tempered Glass Screen Protector (Front Display)
  • JOWUA Tempered Glass Screen Protector (Rear Display)

Protection & Covers

ACNH Fossils

Extras

  • Acanthostega
  • Amber
  • Ankylo skull x 2
  • Ankylo torso x 2
  • Anomalocaris
  • Archelon skull
  • Australopith x 2
  • Brachio tail
@ayn
ayn / turnip exchange.js
Created July 2, 2020 03:28
sort turnip by prices desc on turnip exchange lol
var jq = document.createElement('script');
jq.src = "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
// ... give time for script to load, then type (or see below for non wait option)
jQuery.noConflict();
function sortUsingNestedText(parent, childSelector, keySelector) {
var items = parent.children(childSelector).sort(function(a, b) {
var vA = parseInt(jQuery(keySelector, a).text().substring(0, " Bells".length - 1))