Skip to content

Instantly share code, notes, and snippets.

@jacobstern
jacobstern / MANDARIN CHINESE LEARNING RESOURCES + GUIDE
Created December 29, 2020 21:43
Mandarin Chinese learning resources from Twitter user left pain (https://twitter.com/oldking420). Copied from a Wayback Machine backup from April 7th, 2020. https://web.archive.org/web/20200606120746/https://pastebin.com/6Ma0hcGA
MANDARIN CHINESE LEARNING RESOURCES + GUIDE
ฅ(ミ꒡⋏꒡ミ)∫ʕ¯ᴥ¯oʔ (ง`_´)ง
意思
||' ,,
'''''|'''''''||''''' ||''''''||''''''||
|, ,|' ,, || || ||
'''''''''''''''''''''''' || || ||
,,,,,,,,,,,,,,,,, ||''''''||''''''||
(function () -- ensure we run in a clean scope
-- Prepare globals
local my_ENV, globfuncs = {}, {}
for k,v in pairs(_ENV) do
my_ENV[k] = v
if (type(v) == "function") globfuncs[k] = true
end
@jacobstern
jacobstern / tinyqueue.js
Last active November 6, 2019 22:40
Source snippet from mourner/tinyqueue
/**
Excerpted from https://github.com/mourner/tinyqueue
Copyright (c) 2017, Vladimir Agafonkin
Permission to use, copy, modify, and/or distribute this software for any purpose
with or without fee is hereby granted, provided that the above copyright notice
and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
@jacobstern
jacobstern / actions.ts
Last active December 3, 2018 21:57
Redux scheme for `normalizr.js` and TypeScript
import { TOAST_NOTIFICATION_TRIGGERED } from '../../../constants/ActionTypes'
import { NotificationKind, ToastNotification } from './types'
import { normalizeToastNotification } from './schema'
export interface Action {
type: TOAST_NOTIFICATION_TRIGGERED
entities: object
id: ToastNotification['notificationId']
}
" Jacob Stern - vimrc
call pathogen#infect('bundle')
call pathogen#helptags()
set nocompatible
"lets backspace actually work in insert mode
set backspace=indent,eol,start
@jacobstern
jacobstern / gen_pcs_script.py
Created February 12, 2013 02:20
Utility to name Forte's pitch class sets. Generate a portable script from a TSV file of PCS data using Python's metaprogramming capabilities. Sample output of gen_pcs_script.py included. Sample usage: python gen_pcs_script.py pitch_classes.tsv; python pitch_class_set.py A C# B
#! /usr/bin/python
import csv
import inspect
__pcs_export = set()
def pcs_function(f):
__pcs_export.add(f)