Skip to content

Instantly share code, notes, and snippets.

View ahmedsajid's full-sized avatar

Ahmed Sajid ahmedsajid

View GitHub Profile
@ahmedsajid
ahmedsajid / castanet.sh
Created June 28, 2026 19:01 — forked from DavidePrincipi/castanet.sh
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.
@ahmedsajid
ahmedsajid / spotifycli.sh
Last active August 27, 2021 19:46
Skip Spotify Ads on Linux
# Function to "skip" Spotify Ads by reloading the client
# whenever ad is detected
# Have https://pypi.org/project/spotify-cli-linux/ installed
reload_spotify() {
# Determine what's playing
spotifycli --status | grep -qi 'advertisement\| - Spotify\|^ - '
# If the return matches ads string
@ahmedsajid
ahmedsajid / README.md
Last active April 16, 2020 15:37
Ansible version switcher

Ansible version switcher

Script which installs variety of Ansible versions and sets them up using virtualenv.

Loading ansible

source ./ansible_version 2.7.0

Mostly based on original script by @gbolo

@ahmedsajid
ahmedsajid / README.md
Last active March 14, 2019 01:02
Nginx Plex Config

Nginx config for Plex

Currently if Plex server is exposed on the internet and someone tries to access it, Plex forces you to login using plex id.

This nginx config tricks plex into thinking that request is coming from LAN.