Skip to content

Instantly share code, notes, and snippets.

View PierceLBrooks's full-sized avatar
🇵🇸

Pierce Brooks PierceLBrooks

🇵🇸
View GitHub Profile
@PierceLBrooks
PierceLBrooks / castanet.sh
Created June 20, 2023 20:59 — forked from interfect/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.
"use strict";
var http = require('http');
var url = require('url');
var fs = require('fs');
var mimetypes = {
'.dvb' : 'application/dvbsubs',
'.srt' : 'application/x-subrip',
extends VisualInstance3D
var subworld : World3D = null
var subviewport : SubViewport = null
var texture : ViewportTexture = null
var billboard : Sprite3D = null
var clone : VisualInstance3D = null
var camera : Camera3D = null
var directions = []
var angles = """
@PierceLBrooks
PierceLBrooks / jsbeautify.py
Last active January 17, 2023 16:38 — forked from m4ll0k/jsbeautify.py
Javascript Beautifier with Python
import sys
import logging
import traceback
try:
import jsbeautifier
import requests
import requests_file
except Exception as e:
sys.exit(print("{0}.. please download this module/s".format(e)))
# Author: Pierce Brooks
# https://gist.github.com/PierceLBrooks/d180e8445e3c59fe757e99c932257e9e
import os
import sys
import copy
import math
import cmath
import random
#Copyright 2004 - 2009 Yost Engineering Inc.
##Permission is hereby granted, free of charge, to any person
##obtaining a copy of this software and associated documentation
##files (the "Software"), to deal in the Software without
##restriction, including without limitation the rights to use,
##copy, modify, merge, publish, distribute, sublicense, and/or sell
##copies of the Software, and to permit persons to whom the
##Software is furnished to do so, subject to the following
##conditions: