This file contains 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
pip3 install pyinstall staticx | |
pyinstall --onefile script.py | |
# Static executable with deps | |
staticx dist/script dist/script.static |
This file contains 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
#!/bin/bash | |
cd /root/acme_tiny | |
python ./acme_tiny.py --account-key ./account.key --csr ./domain.csr --acme-dir /var/www/challenges/ > ./signed_chain.crt.tmp || exit | |
mv ./signed_chain.crt.tmp ./signed_chain.crt | |
# Split signed_chain.crt into two files domain_signed.pem and chain.pem | |
# for apache2 support | |
python -c 'f = open("signed_chain.crt", "r"); l = f.read(); f.close(); end = "\n\n"; certs = l.split(end); f = open("domain_signed.pem", "w"); f.write(certs[0]+"\n"); f.close(); f = open("chain.pem", "w"); f.write(end.join(certs[1:])+"\n"); f.close()' |
This file contains 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
#!/bin/bash | |
# Ubuntu 18.04 | |
apt install libncurses5 git build-essential llvm wget libnuma-dev zlib1g-dev libpq-dev postgresql-client-common postgresql-client libkrb5-dev libssl-dev | |
wget https://downloads.haskell.org/~ghc/8.10.1/ghc-8.10.1-aarch64-deb9-linux.tar.xz | |
wget http://downloads.haskell.org/~cabal/cabal-install-3.2.0.0/cabal-install-3.2.0.0.tar.gz | |
tar xf ghc-8.10.1-aarch64-deb9-linux.tar.xz && tar xzf cabal-install-3.2.0.0.tar.gz |
This file contains 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 get_query_from_event(name, event): | |
if 'queryStringParameters' in event and name in event['queryStringParameters']: | |
return event['queryStringParameters'][name] | |
return None |