Skip to content

Instantly share code, notes, and snippets.

View statik's full-sized avatar
😎
happily working! I may be slow to respond

Elliot Murphy statik

😎
happily working! I may be slow to respond
View GitHub Profile
@statik
statik / h2rnotify.py
Last active July 17, 2023 15:26
apprise custom notifications for h2r experiments
#!/usr/bin/env python3
# include the decorator
from apprise.decorators import notify
from apprise.logger import logger
import requests
import re
import json
import sys
@statik
statik / example.ts
Created May 13, 2021 15:04
setting up CDK context values to make stack synth more deterministic rather than relying on runtime lookups
// Given a pre-existing VPC network layout with stable ID, subnets, and routing tables
// this CDK setup code will populate the context necessary for lookups without going
// through synth and maintaining the context cache outside of version control
private setupFooVpcContext(): void {
// this is the CDK context info for the Demo VPC in the example account
const account = "1234"
const region = "us-west-2"
const tag = "MyDemoVPC"
const contextKey =
@statik
statik / waf.ts
Last active April 23, 2024 03:23
WAF with CDK examples
import * as cdk from "@aws-cdk/core";
import * as wafv2 from "@aws-cdk/aws-wafv2";
// This extends the base cdk stack properties to include a tag name input.
export interface StackProps extends cdk.StackProps {
tag: string;
applicationName?: string;
}
export class WAFStack extends cdk.Stack {
@statik
statik / install_ffmpeg.sh
Last active December 18, 2020 22:45 — forked from Piasy/install_ffmpeg.sh
brew install ffmpeg with all options
brew uninstall --force --ignore-dependencies ffmpeg
brew install --ignore-dependencies chromaprint
brew install amiaopensource/amiaos/decklinksdk
brew cask install xquartz
options=$(brew options homebrew-ffmpeg/ffmpeg/ffmpeg | grep -vE '\s' | grep -- '--with-' | grep -vi game-music-emu | tr '\n' ' ')
brew install homebrew-ffmpeg/ffmpeg/ffmpeg ${options}
@statik
statik / generate.sh
Last active December 18, 2020 05:25
prototyping generating placeholders for obs scenes
#!/usr/bin/env bash
# nice script boilerplate from https://betterdev.blog/minimal-safe-bash-script-template/
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
@statik
statik / README.md
Last active November 23, 2020 19:08
Setting up streamdeck to toggle between Speaker / Gallery View

Using streamdeck with Zoom

The streamdeck has a very useful plugin for controlling zoom meetings. This plugin has functionality like mute/unmute, mute all, and leave meeting.

I have been working on adding a button for switching between gallery view and speaker view, which is useful when presenting in a group setting. The code is here: https://github.com/smitmartijn/streamdeck-zoom-plugin/pull/9

As of November 17, 2020, my custom version of the zoom plugin for streamdeck is not working.

@statik
statik / 01. Download Locations for FFmpeg.md
Created October 15, 2020 23:46 — forked from AbsoluteDestiny/01. Download Locations for FFmpeg.md
Some FFMpeg commands I need to remember for converting footage for video editing. http://bit.ly/vidsnippets
@statik
statik / chapters.sh
Created October 7, 2020 20:43
split mp4 into individual files for each chapter
#!/usr/bin/env bash
set -euo pipefail
#set -x
fail () {
local error_message="$1"
local exit_code=$2
echo "$error_message" >&2
@statik
statik / ouch.cpp
Last active September 26, 2020 02:55
embedded osascript for zoom status
std::string osGetZoomStatus()
{
// ESDDebug("APPLESCRIPT_GET_STATUS: %s", APPLESCRIPT_GET_STATUS);
char *zoomStatus = execAndReturn(
"osascript -e 'set zoomStatus to \"closed\"\nset muteStatus to \"disabled\"\n"
"set viewStatus to \"speaker\"\n"
"set videoStatus to \"disabled\"\nset shareStatus to \"disabled\"\ntell application "
"\"System Events\"\nif exists (window 1 of process \"zoom.us\") then\nset zoomStatus "
"to \"open\"\ntell application process \"zoom.us\"\nif exists (menu bar item "
@statik
statik / getZoomStatus.py
Last active September 24, 2020 04:43
uiautomation.py dump of zoom.exe application controls.
# Credit for initial script: https://github.com/oldjohngalt
#
# Martijn Smit <martijn@lostdomain.org / @smitmartijn>
import os
import sys
import time
import argparse
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import uiautomation as automation