Skip to content

Instantly share code, notes, and snippets.

View stonecharioteer's full-sized avatar

Vinay Keerthi stonecharioteer

View GitHub Profile
@stonecharioteer
stonecharioteer / app.py
Created December 3, 2018 10:26 — forked from jtpio/app.py
Dash URL State example
import dash
import dash_core_components as dcc
import dash_html_components as html
from urllib.parse import urlparse, parse_qsl, urlencode
from dash.dependencies import Input, Output
app = dash.Dash()
app.config.suppress_callback_exceptions = True
@stonecharioteer
stonecharioteer / rsync_ngrok.sh
Last active January 12, 2023 22:44
File to help rsync over ngrok.
#!/bin/bash
# Make sure to use this on the server side: `ngrok tcp 22`
# Usage:
# rsync_ngrok USERNAME REMOTEDIRPATH PORTNUMBER LOCALDIRPATH
# if no arguments are given to the script.
if [[ $# -eq 0 ]] ; then
echo 'rsync_ngrok Script used to download files or folders from remote host offering usage via ngrok.'
echo 'Usage: rsync_ngrok USERNAME REMOTEDIRPATH PORTNUMBER LOCALDIRPATH'
@stonecharioteer
stonecharioteer / .zshrc
Last active December 7, 2022 21:20
.zshrc file for oh my zsh
# export ZSH_TMUX_AUTOSTART="true"
alias tmux="tmux -u" # for unicode in tmux
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
@stonecharioteer
stonecharioteer / links.rst
Last active August 19, 2019 16:50
A bunch of links I need to keep around.
@stonecharioteer
stonecharioteer / .nvimrc
Last active May 24, 2020 09:58
dotfiles
" set leader to `,`
let mapleader = ","
" turn on line numbers
set number
" enable syntax highlighting
syntax on
" enable ruler
set ruler
" highlight search
set hls
server {
# SSL configuration
#
# listen 443 ssl default_server;
# listen [::]:443 ssl default_server;
#
# Note: You should disable gzip for SSL traffic.
# See: https://bugs.debian.org/773332
#
@stonecharioteer
stonecharioteer / puzzle.py
Created September 17, 2019 04:06
run this to decode
s = """Jrypbzr gb gur svefg Ivfn OnatClcref zrrghc rirelbar!
Guvf vf gur svefg gvzr jr'ir vaivgrq gur Onatnyber Clguba zrrghc pbzzhavgl gb bhe bssvpr, fb rirelbar gnxr n punapr gb argjbex.
Funer lbhe xabjyrqtr, lbhe gvcf naq lbhe rkcregvfr bs Clguba.
Nobir nyy, unir sha!!
Gb bhe ivfvgbef, Ivfn vf uvevat. Ernpu bhg gb hf naq funer lbhe erfhzrf."""
@stonecharioteer
stonecharioteer / puzzle.py
Created September 17, 2019 04:06
run this to decode
s = """Jrypbzr gb gur svefg Ivfn OnatClcref zrrghc rirelbar!
Guvf vf gur svefg gvzr jr'ir vaivgrq gur Onatnyber Clguba zrrghc pbzzhavgl gb bhe bssvpr, fb rirelbar gnxr n punapr gb argjbex.
Funer lbhe xabjyrqtr, lbhe gvcf naq lbhe rkcregvfr bs Clguba.
Nobir nyy, unir sha!!
Gb bhe ivfvgbef, Ivfn vf uvevat. Ernpu bhg gb hf naq funer lbhe erfhzrf."""
@stonecharioteer
stonecharioteer / puzzle.py
Last active September 17, 2019 04:18
run this to decode
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""This is a rot-13 encoded puzzle. Interestingly, this is how the `this` module is implemented
in Python.
Did you know that the `this` module breaks the Zen of Python in almost *every* possible way?
Run this on Python Anywhere and you can see the output on your phone.
Here's a `link <https://www.pythonanywhere.com/user/stonecharioteer/shares/61f863777d13449599ecab5bf11ff34d/>`_.
@stonecharioteer
stonecharioteer / flask_profiler.py
Created July 14, 2020 13:07 — forked from shreyansb/flask_profiler.py
A profiler for Flask apps
"""
This module provides a simple WSGI profiler middleware for finding
bottlenecks in web application. It uses the profile or cProfile
module to do the profiling and writes the stats to the stream provided
To use, run `flask_profiler.py` instead of `app.py`
see: http://werkzeug.pocoo.org/docs/0.9/contrib/profiler/
and: http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-xvi-debugging-testing-and-profiling
"""