Skip to content

Instantly share code, notes, and snippets.

View timkpaine's full-sized avatar
🦈
work

Tim Paine timkpaine

🦈
work
View GitHub Profile
sudo defaults write /Library/Preferences/com.apple.airport.bt.plist bluetoothCoexMgmt Hybrid
@timkpaine
timkpaine / proposal.md
Last active November 27, 2024 21:41
perspective_openjsf_application.md
Example of perspective multiworker webserver (independent perspective instances)
```bash
uvicorn server:app --workers 4
```
@timkpaine
timkpaine / amex-click-all-offers.js
Last active November 16, 2024 01:28
amex-click-all-offers.js
Array.from(document.getElementsByClassName("offer-cta")).map((elem) => elem.click())
Array.from(document.getElementsByClassName("axp-offers__global__merchantOfferCta___qKBIE")).map((elem) => elem.click())
document.querySelectorAll('mds-icon[type="ico_add_circle"]').forEach((x) => x.click())
@timkpaine
timkpaine / README.md
Last active July 26, 2023 00:46
NGINX make site available only on VPN, with OpenVPN and Certbot

You want a server block in nginx like this

server {
  server_name  <your fqdn>;
  root         /usr/share/nginx/html;

  # allow certbot
  location /.well-known {
      autoindex on;
 root /opt/www-pub/;
@timkpaine
timkpaine / README.md
Created September 8, 2022 17:13
Synology NAS - dnsmasq - allow for just "diskstation" instead of "diskstation.local"

edit /usr/syno/share/nginx/Portal.mustache to remove \.local instances

@timkpaine
timkpaine / .block
Last active January 5, 2022 20:15
Coinbase Trading Pairs Graph (d3 Edge Bundling)
license: apache-2.0
license: apache-2.0
height: 800
def interval_to_chron(interval, start_time):
if interval == Interval.MINUTELY:
# simple
return '*/1 * * * *'
elif interval == Interval.FIVE_MINUTES:
# simple
'*/5 * * * *'
elif interval == Interval.TEN_MINUTES:
return '{start_minute_mod_ten}-59/10 * * * *'.format(start_minute_mod_ten=start_time.minute % 10)
elif interval == Interval.THIRTY_MINUTES: