Skip to content

Instantly share code, notes, and snippets.

@karnawhat
karnawhat / basictex.md
Created October 22, 2019 17:18
Tutorial on installing BasicTeX

Installing BasicTeX

This is a barebones setup to using TeX with matplotlib. Since the whole MacTeX package is ~4GB, and includes a lot of unnecessary binaries, it is better to install BasicTeX and install the packages as you seem fit.

The easiest way to install is by running brew cask install basictex and run which pdflatex to check whether it is installed. This should return a path with the location of the filepath. If it doesn't, then check if the /Library/TeX folder exists.

Finally, add the following to your ~/.bashrc or ~/.bash_profile filepath: export PATH="/Library/TeX/texbin/:$PATH"

Adding packages

anonymous
anonymous / surge-cn.conf
Created March 16, 2018 14:29
[General]
loglevel = notify
skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, 127.0.0.1, localhost, *.local
ipv6 = false
allow-wifi-access = false
dns-server = 114.114.114.114, 223.5.5.5, system
[Rule]
# Apple
USER-AGENT,*com.apple.mobileme.fmip1,DIRECT
@liabru
liabru / save-file-local.js
Created April 24, 2014 17:46
Save a text file locally with a filename, by triggering a download in JavaScript
/*
* Save a text file locally with a filename by triggering a download
*/
var text = "hello world",
blob = new Blob([text], { type: 'text/plain' }),
anchor = document.createElement('a');
anchor.download = "hello.txt";
anchor.href = (window.webkitURL || window.URL).createObjectURL(blob);