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 / 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 {
@lg
lg / adding-tailscale-to-edgerouter.md
Last active April 11, 2024 07:44
Add tailscale to an EdgeRouter and surviving system upgrade

Adding tailscale to an EdgeRouter (and surviving system upgrades)

I suggest you run sudo bash on all of these so you're the root user.

Installing

  1. Download tailscale and put the files in /config/. Find the latest stable or unstable version for your EdgeRouter's processor (ex. ER4 is mips and ERX is mipself)
sudo bash    # if you havent already
@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.

@robert-wallis
robert-wallis / _.local_share_applications_mirror-1080p-mplayer.desktop
Last active September 13, 2020 01:01
Raspberry PI 4; 4" 480x800 viewfinder; Webcam mirrored on HDMI-2
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Name[en_US]=Mirror Webcam 1080p
Type=Application
Exec=/home/pi/mirror-1080p-mplayer.sh
Categories=AudioVideo;Player
import * as sns from '@aws-cdk/aws-sns';
import * as cdk from '@aws-cdk/core';
import { PolicyStatementBuilder } from '../lib/policy';
import { DeployableStack } from '../lib/deployable';
import { PhysicalStackProps } from '../lib/physical';
/** EmptyStack is supposed to contain nothing. It is used when we want to remove all of the constructs
* from a stack, because CloudFormation will not destroy a stack just because we removed it.
*
@crashGoBoom
crashGoBoom / ssm_local.sh
Last active July 1, 2020 19:58
Local Port Forwarding with AWS SSM
#!/bin/bash
# Usage: ./ssm_local.sh i-xxxxxxxxxx 80
_instance_id="${1}"
_instance_port="${2}"
aws ssm start-session --target "${_instance_id}" \
--document-name AWS-StartPortForwardingSession \
--parameters "{\"portNumber\":[\"${_instance_port}\"],\"localPortNumber\":[\"9000\"]}"
@acj
acj / microk8s_in_lxc.md
Last active April 29, 2024 13:39
Installing microk8s in an LXC container

Installing microk8s in an LXC container

I wanted to run Microk8s on a Proxmox 6 host inside of an LXC container. These are my notes from the journey.

  1. Create a privileged LXC container through the Proxmox web interface
  • Enable nesting and FUSE
    • In Proxmox UI, select container, then Options > Features > Check nesting and FUSE boxes
  1. SSH into the Proxmox host and edit the container's config in /etc/pve/lxc/.conf
    • Add the following lines
  • lxc.apparmor.profile: unconfined
@SafEight
SafEight / notion2blog.js
Last active December 9, 2021 00:09 — forked from mayneyao/notion2blog.js
Notion.so > Personal Blog | custom domain + disqus comment
const MY_DOMAIN = "example.com"
const START_PAGE = "https://www.notion.so/example"
addEventListener('fetch', event => {
event.respondWith(fetchAndApply(event.request))
})
const corsHeaders = {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET, HEAD, POST,PUT, OPTIONS",
@crashGoBoom
crashGoBoom / vid2gif.sh
Created August 27, 2019 18:55
Create a gif from mov file using FFMPEG
_video_file="${1}"
ffmpeg -i $_video_file -vf palettegen pal.png
ffmpeg -i $_video_file -i pal.png -lavfi paletteuse=bayer_scale=4:dither=bayer -r 18 video.gif