Skip to content

Instantly share code, notes, and snippets.

View TryTryAgain's full-sized avatar
🎯
Focusing

Michael Lawler TryTryAgain

🎯
Focusing
View GitHub Profile
@TryTryAgain
TryTryAgain / gotp.py
Created January 20, 2023 17:44
A simple "get OTP" python script utilizing pyotp: Supply an MFA seed and get the current and following/next OTP token readout, useful for getting a quick MFA OTP token provided a seed.
#!/usr/bin/env python
import pyotp
import argparse
# Variables grabbed from CLI arguments
parser = argparse.ArgumentParser(
    description='Supply MFA seed and get current and next OTP readout')
parser.add_argument(
    '-s', '--seed',
    required=True
@TryTryAgain
TryTryAgain / fix_copilot_proxy.sh
Created February 19, 2022 04:35
Fix GitHub Copilot behind Netskope or Zscalar or other Proxy
#!/bin/bash
_VSCODEDIR="$HOME/.vscode/extensions"
_COPILOTDIR=$(ls "${_VSCODEDIR}" | grep -E "github.copilot-[1-9].*") # For copilot
_COPILOTDEVDIR=$(ls "${_VSCODEDIR}" | grep "github.copilot-nightly-") # For copilot-nightly
_EXTENSIONFILEPATH="${_VSCODEDIR}/${_COPILOTDIR}/dist/extension.js"
_DEVEXTENSIONFILEPATH="${_VSCODEDIR}/${_COPILOTDEVDIR}/dist/extension.js"
if [[ -f "$_EXTENSIONFILEPATH" ]]; then
echo "Found Copilot Extension, applying 'rejectUnauthorized' patches to '$_EXTENSIONFILEPATH'..."
perl -pi -e 's/,rejectUnauthorized:[a-z]}(?!})/,rejectUnauthorized:false}/g' ${_EXTENSIONFILEPATH}