Skip to content

Instantly share code, notes, and snippets.

Avatar

Ethan J. Brown Iristyle

  • Puppet, Inc.
  • Portland, OR
View GitHub Profile
@cerebrate
cerebrate / README.md
Last active Jan 19, 2021
Recompile your WSL2 kernel - support for snaps, apparmor, lxc, etc.
View README.md

NOTE

See https://gist.github.com/cerebrate/d40c89d3fa89594e1b1538b2ce9d2720#gistcomment-3563688 below before doing anything else.

Recompile your WSL2 kernel - support for snaps, apparmor, lxc, etc.

Yes, I've done this, and yes, it works. It is, however, entirely unsupported and assembled through reasonable guesswork, so if you try this and it explodes your computer, brain, career, relationships, or anything else, you agree that you take sole responsibility for doing it, that I never claimed it was a good idea, and that you didn't get these instructions from me .

View gist:d2b2705b8e57f7bebd8e502cf325b47a
// ==UserScript==
// @name NYT Cooking
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://cooking.nytimes.com/recipes/*
// @grant none
// ==/UserScript==
@superbrothers
superbrothers / kubectl-delete_all
Last active Jan 18, 2021
Kubernetes: Delete all objects in the namespace
View kubectl-delete_all
kubectl delete "$(kubectl api-resources --namespaced=true --verbs=delete -o name | tr "\n" "," | sed -e 's/,$//')" --all
@Aghassi
Aghassi / docker-compose.yml
Last active Jan 14, 2021
LinuxServer Docker Compose: Plex, Sonarr, Radarr, NZBGet, Let's Encrypt, Time Machine
View docker-compose.yml
version: '2'
services:
plex:
image: linuxserver/plex
container_name: plex
volumes:
- /path/to/plex/config:/config
- /path/to/plex/Movies:/data/movies
- /path/to/plex/Shows:/data/tvshows
- /path/to/plex/transcode:/data/transcode
View Parse-EVT.ps1
$EventLogFile = "C:\Source\tmp\PE-23563\FromTicket\DEVAPPVD-718_FAIL_SCALE\DEVAPPVD-718_FAIL_SCALE\EventViewer"
#$EventLogFile = "C:\Source\tmp\PE-23563\FromTicket\DEVAPPVD-723_SUCCESS\DEVAPPVD-723_SUCCESS\EventViewer"
Function Get-Stuff {
# Get Service Start/Stops
$SearchHash = @{
'Path' = $EventLogFile + "\System.evtx"
'ID' = 7036;
}
Get-WinEvent -FilterHashtable $SearchHash | ? { ($_.Properties[0].Value -eq 'Marionette Collective Server') -or ($_.Properties[0].Value -eq 'Puppet Agent') -or ($_.Properties[0].Value -eq 'Puppet PXP Agent') }
@Sharpie
Sharpie / classification.md
Last active Sep 16, 2020
How Environments Happen: In Puppet 5.3
View classification.md
    __  __                 ______           _                                       __
   / / / /___ _      __   / ____/___ _   __(_)________  ____  ____ ___  ___  ____  / /______
  / /_/ / __ \ | /| / /  / __/ / __ \ | / / / ___/ __ \/ __ \/ __ `__ \/ _ \/ __ \/ __/ ___/
 / __  / /_/ / |/ |/ /  / /___/ / / / |/ / / /  / /_/ / / / / / / / / /  __/ / / / /_(__  )
/_/ /_/\____/|__/|__/  /_____/_/ /_/|___/_/_/   \____/_/ /_/_/ /_/ /_/\___/_/ /_/\__/____/

    __  __                             __
   / / / /___ _____  ____  ___  ____  / /
  / /_/ / __ `/ __ \/ __ \/ _ \/ __ \/ /
View AuthyToOtherAuthenticator.md

Generating Authy passwords on other authenticators


There is an increasing count of applications which use Authy for two-factor authentication. However many users who aren't using Authy, have their own authenticator setup up already and do not wish to use two applications for generating passwords.

Since I use 1Password for all of my password storing/generating needs, I was looking for a solution to use Authy passwords on that. I couldn't find any completely working solutions, however I stumbled upon a gist by Brian Hartvigsen. His post had a neat code with it to generate QR codes (beware, through Google) for you to use on your favorite authenticator.

His method is to extract the secret keys using Authy's Google Chrome app via Developer Tools. If this was not possible, I guess people would be reverse engineering the Android app or something like that. But when I tried that code, nothing appeared on the screen. My gues

@auckenox
auckenox / move_packages.sh
Last active Jun 15, 2020
[PLEASE DO NOT USE THIS SCRIPT ANYMORE] Synology move packages to another volume
View move_packages.sh
#!/bin/bash
# ######################################################################################################
## WARNING: THIS SCRIPT HAS THE POTENTIAL TO HARM YOUR DSM ON CURRENT VERSIONS OF DSM! DO NOT USE IT
# ######################################################################################################
# this script moves ALL packages from volume-x to volume-y
# For Synology DSM - tested with DSM6.1
# change these values
from_vol="volume1"
@vector-sec
vector-sec / Get-Token.ps1
Created Aug 10, 2017
PowerShell script to enumerate all Process and Thread tokens.
View Get-Token.ps1
function Get-Token
{
foreach($proc in (Get-Process))
{
if($proc.Id -ne 0 -and $proc.Id -ne 4)
{
try
{
$hProcess = OpenProcess -ProcessId $proc.Id -DesiredAccess PROCESS_QUERY_LIMITED_INFORMATION
}
@wandsas
wandsas / fzf
Last active Feb 26, 2020
fzf snippets used with the zplugin, my favourite plugin-manager for zsh at the moment, after using prezto for a long time.
View fzf
#!/usr/bin/env zsh
#
# Modified from: https://github.com/junegunn/fzf/wiki/examples
#
# Depends on the `fzf` binary
# See: https://github.com/junegunn/fzf#installation
if hash fzf &>/dev/null; then
############################ General examples
# vim **<TAB>