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
const fs = require('fs'); | |
const path = require('path'); | |
const entry = path.resolve(process.argv.slice(2)[0]) || './index.ts'; | |
const entryPath = path.dirname(entry); | |
/** | |
* Tries to find all imported file names in given file. | |
* @param {string} fileName | |
* @returns {string[]} importedFiles | |
*/ |
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
cat *.go | python3 -c "from sys import stdin;a=[c for c in stdin.read() if c.strip() != ''];b=[(a.count(c),c) for c in set(a)];b.sort();b.reverse();print('\n'.join(map(lambda x: '%d\t%s'%x,b)))" |
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
import matplotlib.pyplot as plt | |
plt.rc('text', usetex=True) | |
plt.rc('font',**{'family':'serif','serif':['Computer Modern Roman'],'size':14}) |
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 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 &&\ |
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
<html> | |
<head> | |
<script src="https://unpkg.com/[email protected]"></script> | |
</head> | |
<body> | |
<script src="main.js"></script> | |
</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
# 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' |
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
E = EllipticCurve_from_j(GF(127)(1728)) | |
g = E.plot(size=25,aspect_ratio=1) | |
g.save("./F_127 j_1728.svg") |
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 sagemath/sagemath:8.0-2 | |
ARG SAGE_BRANCH=master | |
EXPOSE 8888 | |
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 |
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
package main | |
import ( | |
"crypto/aes" | |
"crypto/cipher" | |
"crypto/rand" | |
"crypto/sha256" | |
"encoding/hex" | |
"fmt" | |
"strings" |
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
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}}(); |
OlderNewer