Skip to content

Instantly share code, notes, and snippets.

View Zylatis's full-sized avatar
:atom:
Avoiding grues.

Zylatis

:atom:
Avoiding grues.
  • Melbourne
View GitHub Profile
@jdah
jdah / .vimrc
Created June 14, 2021 11:54
jdh's NeoVim .vimrc
call plug#begin()
Plug 'drewtempelmeyer/palenight.vim'
Plug 'vim-airline/vim-airline'
Plug 'wlangstroth/vim-racket'
Plug 'sheerun/vim-polyglot'
Plug 'rust-lang/rust.vim'
Plug 'preservim/tagbar'
Plug 'universal-ctags/ctags'
Plug 'luochen1990/rainbow'
Plug 'vim-syntastic/syntastic'
@treuille
treuille / powers_in_dash.py
Last active July 10, 2020 13:15
Comparing Dash and Streamlit
import dash
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output
external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css']
app = dash.Dash(__name__, external_stylesheets=external_stylesheets)
app.layout = html.Div([
@tvst
tvst / SessionState.py
Last active April 14, 2024 20:24
DO NOT USE!!! Try st.session_state instead.
"""Hack to add per-session state to Streamlit.
Usage
-----
>>> import SessionState
>>>
>>> session_state = SessionState.get(user_name='', favorite_color='black')
>>> session_state.user_name
''
@audy
audy / xml-to-dict.py
Created October 22, 2018 19:34
Convert nested XML data into dictionaries
#!/usr/bin/env python3
import xml.etree.ElementTree as ET
from pprint import pprint
import code
tree = ET.parse('biosample_result.xml')
def expand_blob(blob, attributes={}):
'''
@nrollr
nrollr / nginx.conf
Last active June 9, 2024 23:39
NGINX config for SSL with Let's Encrypt certs
# UPDATED 17 February 2019
# Redirect all HTTP traffic to HTTPS
server {
listen 80;
listen [::]:80;
server_name www.domain.com domain.com;
return 301 https://$host$request_uri;
}
# SSL configuration
@Gumnos
Gumnos / passphrasegen.py
Last active June 6, 2021 00:49
Generate a pass-phrase like "correct horse battery staple" from a dictionary of words
#!/usr/bin/env python
import locale
import random
import re
import sys
from codecs import encode
from copy import copy
from optparse import OptionParser
EXIT_SUCCESS = 0