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/bash | |
# Grab auth_token, x-csrf-token (ct0) for use with Nitter | |
# and other tools (requires Twitter account). | |
# - 1-2 successfull logins can be seen every 60 seconds (not fully tested) | |
username="" | |
password="" | |
# number of login attempts | |
debug=1 # [0|1] set to 0 if redirecting output to config |
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/bash | |
dates() { | |
dateutils.dseq 2022-11-01 now -f '%Y-%m-%d' | cat -n | |
} | |
export -f dates | |
monthly_seq=$(dates | grep 01$ | awk ' { t = $1; $1 = "\""$2"\""; $2 = t","; print; } ' | tr '\n' ' ' | sed 's/, $//') | |
last_day=$(dates | sed -n 'x;$p') |
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/bash | |
# pretty print pluto.tv guide | |
# use '1' option for up next? | |
if [ -z $1 ]; then | |
n=0 | |
else | |
n=$1 | |
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
#!/bin/bash | |
# Check for atmospheric inversion via KSEA soundings | |
# ex: | |
# +.08 - 41.78° @ 867.55 feet | |
# +.88 - 42.58° @ 1064.47 feet | |
# +.84 - 42.54° @ 1295.16 feet | |
# Portland, OR (KPDX) - https://a.atmos.washington.edu/mm5rt/rt/showsounding_d3.cgi?initmodel=GFS&yyyymmddhh=timeindep&reqhr=12&loc=kpdx&locname=Portland,OR&latlon=45.59N,122.6W | |
sounding=$(curl -s 'https://a.atmos.washington.edu/mm5rt/rt/showsounding_d3.cgi?initmodel=GFS&yyyymmddhh=timeindep&reqhr=12&loc=ksea&locname=Sea-Tac,WA&latlon=47.44N,122.31W') | |
out=$(grep -A 30 TMPF <<< "${sounding}" | tail -30 | awk '{print $4,$10}') |
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
#EXTM3U | |
#EXTINF:0,00s Replay | |
http://service-stitcher.clusters.pluto.tv/stitch/hls/channel/62ba60f059624e000781c436/master.m3u8?advertisingId=&appName=web&appVersion=unknown&appStoreUrl=&architecture=&buildVersion=&clientTime=0&deviceDNT=0&deviceId=5d9cd8e2-dd04-11eb-990c-d7728814a60c&deviceMake=Chrome&deviceModel=web&deviceType=web&deviceVersion=unknown&includeExtendedEvents=false&sid=0c6cb070-0cfd-4d6c-ad81-c614133fd44b | |
#EXTINF:0,48 Hours | |
http://service-stitcher.clusters.pluto.tv/stitch/hls/channel/6176f39e709f160007ec61c3/master.m3u8?advertisingId=&appName=web&appVersion=unknown&appStoreUrl=&architecture=&buildVersion=&clientTime=0&deviceDNT=0&deviceId=5d9cd8e2-dd04-11eb-990c-d7728814a60c&deviceMake=Chrome&deviceModel=web&deviceType=web&deviceVersion=unknown&includeExtendedEvents=false&sid=0c6cb070-0cfd-4d6c-ad81-c614133fd44b | |
#EXTINF:0,70s Cinema | |
http://service-stitcher.clusters.pluto.tv/stitch/hls/channel/5f4d878d3d19b30007d2e782/master.m3u8?advertisingId=&appName=web&appVersion=unknown&appStoreUrl=&archit |
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/bash | |
# Grab latest Hurricane Milton longwave IR image with overlays | |
# example: https://i.imgur.com/hMiwLZy.jpeg | |
# can't figure out the start & end params here | |
#gulf_sat=$(curl -so /tmp/gulf-sat.gif 'https://weather.cod.edu/satrad/assets/php/scripts/mkgif.php?parms=regional-gulf-13-1&rate=&pause=&start=891&end=891&checked=counties-usint-map&colorbar=undefined') | |
# so, doin' it by hand | |
# slurp overlays | |
if [[ ! -e /tmp/gulf_map.png || ! -e /tmp/gulf_counties.png || ! -e /tmp/gulf_usint.png ]]; then |
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/bash | |
# kitty terminal - launcher wrapper | |
# ~/.config/kitty/kitty.conf: open_url_with ff-redir | |
url=$1 | |
# redirect twitter/x.com to local nitter instance | |
redir=$(sed 's|https://twitter.com|http://fuck.elon|;s|https://x.com|http://fuck.elon|' <<< "${url}") | |
# launch videos with mpv | |
videos="(youtube.com|youtu.be|twitch.tv|\.m3u8)" |
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/bash | |
# Tropical storm Milton animation | |
find . -maxdepth 1 -type l -delete | |
d=$(date -u -Is ) | |
dateutils.dseq ${d:0: -10}0 -10m 00:00:00 -f gulf.13.%Y%m%d.%H%M | | |
sed 's/0$/617.jpg/' | | |
tac | | |
while read file; do |
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/python3 | |
import sys | |
import json | |
from noaa_sdk import NOAA | |
import linecache as lc | |
zip = sys.argv[1] | |
n = NOAA() | |
res = n.get_forecasts(zip, 'US') | |
for i in res: | |
results = str(i) |
NewerOlder