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
"""Module for handling authentication, interactions with Firebase and JWT cookies. | |
This solution is refactored from the ‘streamlit_authenticator’ package . It leverages JSON | |
Web Token (JWT) cookies to maintain the user’s login state across browser sessions. For the | |
backend, It uses Google’s Firebase Admin Python SDK. This solution ensures that the content | |
of the page and user settings panel are only displayed if the user is authenticated. Similarly, | |
the login page can only be accessed if the user is not authenticated. Upon registration, the | |
user is sent a verification link to their e-mail address. | |
Important - to make this app run, put the following variables in your secrets.toml file: | |
COOKIE_KEY - a random string key for your passwordless reauthentication |
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 | |
################################################################################ | |
# cap - capture your screen | |
# | |
# This script allows you to capture your screen on Linux or macOS systems using | |
# the appropriate tools available on each platform. On Linux, it uses 'slop' | |
# and 'ffmpeg', while on macOS, it utilizes 'screencapture'. The script prompts | |
# you to select a desktop area for recording and saves the recording as an MP4/MOV | |
# file with customizable video quality. |
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
# | |
# ZMK | |
# | |
# | |
# Basic Keyboard Setup | |
# | |
CONFIG_ZMK_KEYBOARD_NAME="Zaphod" | |
CONFIG_USB_DEVICE_PRODUCT="Zaphod" |
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
git diff-tree --no-commit-id --name-only -r `git rev-parse master` | awk -F "/" '{print $1}' | uniq | | |
grep mysql2hive && /usr/local/bin/dockerd-entrypoint.sh /bin/drone-docker |
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
brew install openssl readline sqlite3 xz zlib | |
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target / | |
curl https://pyenv.run | bash |
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
helm upgrade --install --set controller.service.type=NodePort --set controller.service.nodePorts.http=32080 --set controller.service.nodePorts.https=32443 nginx-ingress stable/nginx-ingress |
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
kubeadm config view > /root/kubeadmconf.yml | |
kubeadm config upload from-file --config /root/kubeadmconf.yml | |
cd /etc/kubernetes/pki | |
# check cert before | |
openssl x509 -in apiserver.crt -text -noout | |
rm apiserver.* | |
kubeadm init phase certs apiserver --config=/root/kubeadmconf.yml | |
# check cert after | |
openssl x509 -in apiserver.crt -text -noout | |
systemctl daemon-reload |
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
curl -s https://search.kingdomnote.com/\?limit\=20\&order\=priceAsc\&keyword\=%E3%82%AD%E3%83%A3%E3%83%83%E3%83%97%E3%83%AC%E3%82%B9%20PILOT\#itemlist | python3 -c 'import sys, re; s = sys.stdin.read(); res = [int(x.replace(",","")) for x in re.findall("""FP-resultItem__price">¥(.+?)<""", s)]; print(res);' |
Hive number of files and sizes
http://www.openkb.info/2014/12/how-to-control-file-numbers-of-hive.html
MapReduce split size and mapper
https://www.jianshu.com/p/af5ff4c3348f
https://blog.cloudera.com/blog/2009/12/7-tips-for-improving-mapreduce-performance/
NewerOlder