Skip to content

Instantly share code, notes, and snippets.

View grade scalar
<!DOCTYPE html>
<script type="text/javascript">
const grades = [
tscholl2 / ec.svg
Last active Sep 29, 2018
plot of adding points on an elliptic curve
View ec.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
tscholl2 / controller.min.js
Last active Jul 5, 2019
another redux-ish C in MVC
View controller.min.js
var Controller=function(){return function(t){var n=this;this.p=[],this.l=[],this.getState=function(){return n.s},this.addPlugin=function(t){n.p.push(t)},this.removePlugin=function(t){n.p=n.p.filter(function(n){return n!==t})},this.addListener=function(t){n.l.push(t)},this.removeListener=function(t){n.l=n.l.filter(function(n){return n!==t})},this.dispatch=function(t){n.p.forEach(function(n){return t=n(t)});var i=t(n.s);n.s!==i&&(n.s=i,n.l.forEach(function(t){return t(n.s,n.dispatch)}))},this.s=t}}();
tscholl2 / aes.go
Last active Oct 30, 2021
simple AES encryption/decryption example with PBKDF2 key derivation in Go, Javascript, and Python
View aes.go
package main
import (
tscholl2 / Dockerfile
Last active Jan 19, 2018
sage in docker with extras
View Dockerfile
FROM sagemath/sagemath:8.0-2
RUN echo && \
# update system
apt-get update && apt-get install -y && \
# install some dependencies for gifs and animations
apt-get install -y imagemagick ffmpeg && \
# install tex
View profile.sage
E = EllipticCurve_from_j(GF(127)(1728))
g = E.plot(size=25,aspect_ratio=1)"./F_127 j_1728.svg")
tscholl2 / .bashrc
Last active Sep 7, 2019
vscode settings
View .bashrc
# Color prompt
PS1='\[\033[1;36m\]\u\[\033[1;31m\]@\[\033[1;32m\]\h\[\033[1;31m\]:\[\033[1;35m\]\w\[\033[1;31m\]\$\[\033[0m\] '
## Colorize the ls output
alias ls='ls --color=auto'
tscholl2 / index.html
Last active Aug 31, 2017
caching and promis-ing in hyperapp
View index.html
<script src=""></script>
<script src="main.js"></script>
tscholl2 / Dockerfile
Last active Apr 8, 2019
Dockerfile for TexStudio
View Dockerfile
FROM debian:stretch
# setup: language and ensure that external fonts and doc folders exists
RUN export LANG=C.UTF-8 &&\
mkdir -p /usr/share/fonts/external/ &&\
mkdir /doc/
# install utilities, texlive, ghostscript, and remove unused docs
RUN apt-get clean &&\
apt-get update &&\
tscholl2 /
Created Apr 19, 2017
TeX'd graphs in sage
import matplotlib.pyplot as plt
plt.rc('text', usetex=True)
plt.rc('font',**{'family':'serif','serif':['Computer Modern Roman'],'size':14})