Skip to content

Instantly share code, notes, and snippets.

@ScriptAutomate
ScriptAutomate / vpn-cloudformation-template.yaml
Last active May 22, 2024 02:50 — forked from pbzona/vpn-cloudformation-template.yaml
Roll your own Amazon Linux 2 OpenVPN with AWS CloudFormation (w/ Dynamically Discovered Latest AMI Id via Parameter Store)
# Personal OpenVPN Server Deployment
# Updates applied by Derek Ardolf / @ScriptAutomate / https://icanteven.io
# 11/08/2019 - Version 2.x:
# - Released with many updates, and tracked here: https://github.com/ScriptAutomate/openvpn-cfn
#
# Created by John Creecy / @zugdug
# 10/30/2017 - Version 1.0:
# - Original: https://gist.github.com/zugdud/b39eea02faa6926305f57fbde8d31b68
# Original Linux Academy blog series walkthrough on building the old OpenVPN template:
# - Part 1: https://linuxacademy.com/blog/tutorials/roll-vpn-aws-cloudformation-part-one/
@ScriptAutomate
ScriptAutomate / Install-WSLAndUbuntu.ps1
Last active May 22, 2024 02:49
Enable WSL and Install Ubuntu 22.04 (or 20.04)
<#
- BIOS of host machine also needs to be configured to allow hardware virtualization
- Windows 10 Pro or otherwise is needed; Windows 10 Home Edition CANNOT get WSL
- This gist WSLv2, but can use WSLv1 instead. I needed v1 as I run Windows 10 in a VM in Virtualbox.
- WSLv2 has been giving me problems in Virtualbox 6.1, but WSLv1 works properly.
- vbox has issues with the GUI settings when it comes to nested virtualization on certain systems,
so run the following if needing to give a VM this enabled setting:
VBoxManage modifyvm <vm-name> --nested-hw-virt on
#>
@ScriptAutomate
ScriptAutomate / gh-delete-auditor.sh
Last active May 22, 2024 02:49
Provided a PR that is deleting files from a project, checks all other open PRs to see what PRs may be impacted
#!/usr/bin/env bash
# Wraps around GitHub CLI (gh): https://cli.github.com/
# Check all other open PRs that are working on
# files being deleted by the target PR.
# Usage:
# ./gh-delete-auditor.sh <PR>
#
# Example:
# ./gh-delete-auditor.sh 57645
@PicoMitchell
PicoMitchell / get_compatible_macos_versions-asls.sh
Last active May 22, 2024 02:49
Scripts to get compatible macOS versions from Apple Software Lookup Service (gdmf.apple.com/v2/pmv) or Software Update Catalog (swscan.apple.com[...]sucatalog).
#!/bin/bash
#
# Created by Pico Mitchell (of Random Applications) on 1/5/23
#
# https://gist.github.com/PicoMitchell/877b645b113c9a5db95248ed1d496243#file-get_compatible_macos_versions-asls-sh
#
# MIT License
#
# Copyright (c) 2023 Pico Mitchell (Random Applications)
@jamietre
jamietre / docker-compose.yml
Last active May 22, 2024 02:48
Script to start WSL and bind localhost to WSL IP
# Example docker-compose.yml for plex.
version: "2"
services:
plex:
image: plexinc/pms-docker:plexpass
runtime: nvidia
container_name: "plex"
restart: always
hostname: "MY-PLEX"
volumes:
@StephanTLavavej
StephanTLavavej / videos.md
Last active May 22, 2024 02:46
C++ Videos by Stephan T. Lavavej
import { NodeRuntime } from "@effect/platform-node";
import { Schema } from "@effect/schema";
import { SqsLive, SqsService } from "@repo/shared/src/Sqs";
import { Chunk, Console, Effect, Option, Stream, pipe } from "effect";
import { logError, logInfo } from "effect/Effect";
import { Consumer } from "sqs-consumer";
function makeStream<T, U>({
queueName,
@wtbarnes
wtbarnes / push-to-someone-elses-pr.md
Created March 5, 2020 04:49
Brief instructions for how to modify and push to someone else's PR on github

How to Push to Someone Else's Pull Request

Let's say contributor has submitted a pull request to your (author) project (repo). They have made changes on their branch feature and have proposed to merge this into origin/master, where

origin -> https://github.com/author/repo.git

Now say you would like to make commits to their PR and push those changes. First, add their fork as a remote called

@realvjy
realvjy / ChoasLinesShader.metal
Last active May 22, 2024 02:43
Choas Lines - Metal Shader
// Lines
float hash( float n ) {
return fract(sin(n)*753.5453123);
}
// Slight modification of iq's noise function.
float noise(vector_float2 x )
{
vector_float2 p = floor(x);
vector_float2 f = fract(x);
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 22, 2024 02:42
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname