Skip to content

Instantly share code, notes, and snippets.

# Antigen: https://github.com/zsh-users/antigen
ANTIGEN="$HOME/.local/bin/antigen.zsh"
# Install antigen.zsh if not exist
if [ ! -f "$ANTIGEN" ]; then
echo "Installing antigen ..."
[ ! -d "$HOME/.local" ] && mkdir -p "$HOME/.local" 2> /dev/null
[ ! -d "$HOME/.local/bin" ] && mkdir -p "$HOME/.local/bin" 2> /dev/null
# [ ! -f "$HOME/.z" ] && touch "$HOME/.z"
URL="http://git.io/antigen"
##
## Manjaro Linux custom mirrorlist
## Generated on 2020-01-16 15:01
##
## Please use 'pacman-mirrors -id' To reset custom mirrorlist
## Please use 'pacman-mirrors -c all' To reset custom mirrorlist
## To remove custom config run 'pacman-mirrors -c all'
##
## Country : United_States
class Arrayify:
def __init__(self, f):
self.f = f
def __getitem__(self, i):
print("Getitem Called")
return self.f(i)
def f(x):
print("Computing...")
return ((x+1)*x)//2
@peijunz
peijunz / loncapa_reset.user.js
Last active September 8, 2017 01:36
Massive Reset for Lon-Capa
// ==UserScript==
// @name Massive Reset for Lon-Capa
// @description One click button to reset whole section
// @namespace https://peijunz.github.io
// @author Peijun Zhu
// @include http://nplq1.phyast.pitt.edu/adm/grades
// @include http://homework.phyast.pitt.edu/adm/grades
// @version 2017.09.07.2
// @grant none
// @icon http://www.courseweaver.com/images/lc_logo.png
@peijunz
peijunz / nbview_flush.user.js
Last active May 28, 2017 02:49
Flush the nbviewer
// ==UserScript==
// @name Refresh/Clear NBViewer Cache
// @namespace https://peijunz.github.io
// @author Peijun Zhu
// @description Add a button to navigation bar to refresh/clear the cache of nbviewer
// @include *://nbviewer.jupyter.org/*.ipynb*
// @version 2.4.1
// @grant none
// @icon https://github.com/jupyter/design/raw/master/logos/Square%20Logo/squarelogo-greytext-orangebody-greymoons/squarelogo-greytext-orangebody-greymoons.png
// ==/UserScript==