Exhaustive list of SPDX (Software Package Data Exchange) licenses: https://spdx.org/licenses/
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 psycopg2 | |
| from sshtunnel import SSHTunnelForwarder | |
| # For interactive work (on ipython) it's easier to work with explicit objects | |
| # instead of contexts. | |
| # Create an SSH tunnel | |
| tunnel = SSHTunnelForwarder( | |
| ('128.199.169.188', 22), | |
| ssh_username='<username>', |
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
| """UDP proxy server.""" | |
| import asyncio | |
| class ProxyDatagramProtocol(asyncio.DatagramProtocol): | |
| def __init__(self, remote_address): | |
| self.remote_address = remote_address | |
| self.remotes = {} |
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 requests | |
| import base64 | |
| from tqdm import tqdm | |
| master_json_url = 'https://178skyfiregce-a.akamaihd.net/exp=1474107106~acl=%2F142089577%2F%2A~hmac=0d9becc441fc5385462d53bf59cf019c0184690862f49b414e9a2f1c5bafbe0d/142089577/video/426274424,426274425,426274423,426274422/master.json?base64_init=1' | |
| base_url = master_json_url[:master_json_url.rfind('/', 0, -26) + 1] | |
| resp = requests.get(master_json_url) | |
| content = resp.json() |
This a collection of interesting links found in The Imposter's Handbook by Rob Conery.
Content:
→ Great great documentation about all this (so much better): https://github.com/drduh/YubiKey-Guide
Documentation for PIV: https://github.com/Yubico/yubikey-piv-manager/tree/master/doc
To manage the certificates: https://www.yubico.com/support/knowledge-base/categories/articles/unpair-yubikey-piv-login-macos-sierra/
- Create or find a gist that you own.
- Clone your gist (replace
<hash>with your gist's hash):# with ssh git clone [email protected]:<hash>.git mygist # with https
git clone https://gist.github.com/.git mygist
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
| ''' | |
| Basic functions for clearing stdin by checking whether a | |
| read will block. | |
| ''' | |
| import select | |
| import sys | |
| def has_unread_input(stream=sys.stdin, timeout=0): | |
| ''' |
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
| # most people include something like this. don't. | |
| # check your default nginx.conf, it's already covered in a much better way. | |
| #gzip_disable "MSIE [1-6]\.(?!.*SV1)"; | |
| # compress proxied requests too. | |
| # it doesn't actually matter if the request is proxied, we still want it compressed. | |
| gzip_proxied any; | |
| # a pretty comprehensive list of content mime types that we want to compress | |
| # there's a lot of repetition here because different applications might use different |
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
| # migrating from https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/git/git.plugin.zsh | |
| # Aliases | |
| alias g='git' | |
| #compdef g=git | |
| alias gst='git status' | |
| #compdef _git gst=git-status | |
| alias gd='git diff' | |
| #compdef _git gd=git-diff | |
| alias gdc='git diff --cached' |