Skip to content

Instantly share code, notes, and snippets.

View wtt604's full-sized avatar

John wtt604

  • Canada, wet coast
  • 20:33 (UTC -07:00)
View GitHub Profile
@interfect
interfect / castanet.sh
Last active May 30, 2025 07:08
Set up a Chromecast from a Linux PC, without an Android or iOS mobile device and without Google Home
#!/usr/bin/env bash
# castanet.sh: Script to connect a chromecast to a WiFi network.
#
# Allows you to put your Chromecast on WiFi and do Chromecast initial setup
# without using the Google Home app at all, just using a normal Linux computer.
#
# You do need your Chromecast to be on Ethernet, or (untested) to join its setup WiFi
# network with your PC, and you also need to find out its IP yourself with e.g.
# Wireshark.
@arbakker
arbakker / README.md
Last active November 8, 2024 21:39
Manipulate GeoJSON/JSON with jq

Manipulate (Geo)JSON with jq

Remove attributes with jq from a GeoJSON file:

cat points.geojson | jq ".features[].properties |= del(.c) | .features[].properties |= del(.d)"

Add property with default value:

@RafaelPalomar
RafaelPalomar / autoumount_udev_systemd.org
Last active May 20, 2023 22:40
Automount USB external drives with udev rules and systemd workaround #udev #automount #usb #systemd #gentoo

Automount USB external drives with udev rules and systemd workarounds

Generate /etc/udev/rules.d/11-media-by-label-auto-mount.rules with the following content

KERNEL!="sd[a-z][0-9]", GOTO="media_by_label_auto_mount_end"  
# Import FS infos  
IMPORT{program}="/sbin/blkid -o udev -p %N"  
# Get a label if present, otherwise specify one  
ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}"