This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Courtesy of Vytautas Liuolia @vytas7 | |
import falcon.asgi | |
import httpx | |
class Proxy(object): | |
UPSTREAM = 'https://falconframework.org' | |
def __init__(self): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo $(tr '[:upper:]' '[:lower:]' <<<"$ENV") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# NOTE: For zsh use: | |
# | |
# read CONTINUE"?Deploy now? [y/N]: " | |
# read -s PWD"?Vault password: " | |
# | |
read -p "Deploy now? [y/N]: " CONTINUE | |
if [[ ! $CONTINUE =~ ^[Yy]$ ]]; then | |
exit | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CFLAGS="-I$(brew --prefix openssl)/include -I$(brew --prefix bzip2)/include -I$(brew --prefix readline)/include -I$(xcrun --show-sdk-path)/usr/include" LDFLAGS="-L$(brew --prefix openssl)/lib -L$(brew --prefix readline)/lib -L$(brew --prefix zlib)/lib -L$(brew --prefix bzip2)/lib" pyenv install --patch 3.8.9 < <(curl -sSL https://github.com/python/cpython/commit/8ea6353.patch\?full_index\=1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ---------------------------------------------------------------------------- | |
import json | |
import simdjson | |
import libpy_simdjson | |
decoder_std = json.JSONDecoder() | |
encoder_std = json.JSONEncoder(ensure_ascii=False) | |
p = simdjson.Parser() | |
p2 = libpy_simdjson.Parser() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def randstr(max_count=32, charset=(string.ascii_letters + '-')): | |
return ''.join( | |
random.choice(charset) | |
for _ in range(random.randint(1, max_count)) | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Credit: https://blog.netwrix.com/2018/10/16/how-to-create-change-and-test-passwords-using-powershell/ | |
# RDP: 3389 | |
$Password = (Read-Host -Prompt "New Password" -AsSecureString) | |
$User = (Read-Host -Prompt "Username") | |
$UserAccount = Get-LocalUser -Name $User | |
$UserAccount | Set-LocalUser -Password $Password |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Credit: @vytas7 (Vytautas Liuolia) | |
import queue | |
import signal | |
import threading | |
import time | |
import uuid | |
import falcon |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sudo vim /etc/profile.d/autologout.sh | |
TMOUT=900 | |
readonly TMOUT | |
export TMOUT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
_MYDIR = os.path.abspath(os.path.dirname(__file__)) | |
print(_MYDIR) |