Skip to content

Instantly share code, notes, and snippets.

View DigitalRogues's full-sized avatar

Brandon H DigitalRogues

View GitHub Profile
@DigitalRogues
DigitalRogues / hue.py
Created January 23, 2022 17:53 — forked from GammaGames/hue.py
kano wand + phillips hue
from kano_wand.kano_wand import Shop, Wand, PATTERN
from qhue import Bridge
import moosegesture as mg
import time
import random
import math
class GestureWand(Wand):
def post_connect(self):
self.gestures = {
@DigitalRogues
DigitalRogues / demo.sh
Last active April 28, 2021 17:57
parallelize YouTube-dl
#get urls off a play list
youtube-dl -j --flat-playlist 'https://www.youtube.com/watch?v=k4JGSAmu4lg' | jq -r '.id' | sed 's_^_https://youtube.com/v/_' > urls.txt
#pass the list through parallels and fire off a youtube-dl command for each url.
parallel -a urls.txt youtube-dl -f 'bestvideo+bestaudio/best' --write-description --write-info-json --write-annotations --restrict-filenames
#if you need to limit the jobs, parallels --jobs 4
#for multiple connections per file
youtube-dl -f 'bestvideo+bestaudio/best' --write-description --write-info-json --write-annotations \
--external-downloader aria2c --external-downloader-args '-c -j 16 -x 16 -s 16 -k 1M' https://youtu.be/rge0Xg7U6Lc

Disable Device Enrollment Notification on Mac.md

Restart the Mac in Recovery Mode by holding Comment-R during restart

Open Terminal in the recovery screen and type

csrutil disable

Disable Device Enrollment Program (DEP) notification on macOS Catalina.md

With full reinstall (recommended)

   a. Boot into recovery using command-R during reboot, wipe the harddrive using Disk Utility, and select reinstall macOS

   b. Initial installation will run for approximately 1 hour, and reboot once

   c. It will then show a remaining time of about 10-15 minutes

@DigitalRogues
DigitalRogues / After.lua
Created May 25, 2020 22:24 — forked from jnwhiteh/After.lua
An example addon showing a simple frame in XML used in Lua
print("After the XML is loaded", FrameTestFrame)
local seconds = 10
local total = 0
FrameTestFrame:SetScript("OnUpdate", function(self, elapsed)
total = total + elapsed
if total > seconds then
self:SetScript("OnUpdate", nil)
end
local sides = 100 + (100 * (total / seconds))
@DigitalRogues
DigitalRogues / youtube-dl.md
Last active April 9, 2020 16:22
Using youtube-dl to download courses from Pluralsight

Download courses from learning sites with youtube-dl

You can download whole courses from an array of tutorial sites with the CLI tool youtube-dl. In the example further down I'm using my Pluralsight account to get videos from a course at their site. Here is a list of all supported sites that you can download from with this tool

The flags you have to supply may vary depending on which site you make a request to.

You can get a free 3 month trial to Pluralsight by signing up for free to Visual Studio Dev Essentials

Installation

@DigitalRogues
DigitalRogues / gcrgc.sh
Created October 30, 2018 19:15 — forked from ahmetb/gcrgc.sh
Script to clean up Google Container Registry images pushed before a particular date
#!/bin/bash
# Copyright © 2017 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@DigitalRogues
DigitalRogues / dump.go
Created June 3, 2018 23:26 — forked from chilts/dump.go
Dump entire BoltDB to stdout, including Nested Buckets
package main
import (
"fmt"
"log"
"strings"
"time"
"github.com/boltdb/bolt"
)
{
"annotations": {
"list": []
},
"description": "",
"editable": true,
"gnetId": 22,
"graphTooltip": 0,
"hideControls": false,
"id": 2,
@DigitalRogues
DigitalRogues / example-app.yaml
Created February 1, 2018 22:42 — forked from tylerjl/example-app.yaml
Example kubernetes-vault with vaultenv config
apiVersion: v1
kind: ConfigMap
metadata:
name: logstash-secrets
data:
logstash.secrets: |
ELASTICSEARCH_USERNAME=elasticsearch/production#username
ELASTICSEARCH_PASSWORD=elasticsearch/production#password
---
apiVersion: v1