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
#!/bin/bash | |
# Simplified curl | |
function kurl() { | |
local delimiter=$'\x1E' # ASCII record separator | |
local response=$(curl -s "$@" -w "${delimiter}%{http_code}") | |
IFS="$delimiter" read -r body http_code <<< "$response" | |
export HTTP_CODE="$http_code" | |
echo $body |
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
# jq REPL (jq + fzf = jf) | |
function jf() { | |
if [ $# -eq 0 ]; then | |
# pipe input | |
tempfile=$(mktemp) | |
cat > "$tempfile" | |
echo '' | fzf --print-query --preview "jq {q} $tempfile" | |
rm "$tempfile" | |
else | |
# filename arg input |
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
#!/bin/bash | |
set -x | |
# Install important packages | |
sudo apt update | |
sudo apt install -y zsh fzf autojump tmux jq | |
# Change the default shell to zsh | |
# chsh -s $(which zsh) |
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
from flask import Flask, render_template, request | |
from flask_socketio import SocketIO, emit | |
import json | |
from backend import config | |
from supertokens_python import init | |
from flask import jsonify, g | |
from supertokens_python.framework.flask import Middleware | |
from supertokens_python.recipe.session.syncio import get_session, get_session_without_request_response |