Skip to content

Instantly share code, notes, and snippets.

whophil / ipython-notebook.conf
Last active Aug 18, 2018
Upstart file (Ubuntu) for Jupyter / IPython notebook
View ipython-notebook.conf
start on filesystem or runlevel [2345]
stop on shutdown
description "Jupyter / IPython Notebook Upstart script"
export HOME="/home/phil/Notebooks"; cd $HOME
echo $$ > /var/run/
exec su -s /bin/sh -c 'exec "$0" "$@"' phil -- /home/phil/Enthought/Canopy_64bit/User/bin/jupyter-notebook --config='/home/phil/.jupyter/'
end script
whophil /
Created Dec 5, 2015
Complete setup of a containerized OpenVPN server based on kylemanna/openvpn.
# This script creates the configuration for an OpenVPN server (in Docker)
# and runs it. A client configuration file is saved OVPN_CLIENT_FILENAME.
# The OpenVPN docker container creates a volume container with the name
# given by OVPN_DATA_NAME. The OpenVPN server docker is exposed on the port
whophil / Preferences.sublime-settings
Last active Dec 13, 2020
Sublime Text 3 user settings to use Unix style line endings by default (and also show the line ending type in the status bar)
View Preferences.sublime-settings
"always_show_minimap_viewport": true,
"bold_folder_labels": true,
"color_scheme": "Packages/User/SublimeLinter/base16-ocean.light (SL).tmTheme",
"default_line_ending": "unix",
"font_size": 12,
"Monokai Extended",
whophil / .gitignore
Last active Jan 16, 2019
.gitignore for LaTeX projects (ignoring *.sublime-workspace files)
View .gitignore
## SublimeText Workspace
## Main PDF file
## Core latex/pdflatex auxiliary files:
whophil / latex.sublime-project
Last active Mar 24, 2016
Sublime Text: Barebones LaTeX .sublime-project file (with file_exclude_patterns for LaTeX projects)
View latex.sublime-project
"path": "path/to/your/project",
"file_exclude_patterns" :
whophil / .gitignore
Created Feb 21, 2016 — forked from k0d3r/gist:3118874
.gitignore for OS (Windows/Mac) generated files
View .gitignore
# Windows
# OS X
whophil /
Last active Mar 14, 2016
Shell script to run latexdiff against a TeX file (with specified commit hash) from the current repository.
#!/usr/bin/env bash
# Shell script to run latexdiff against the same file from a specified commit hash.
# Example:
# ./ main.tex 12dfa1a
# $1 is the name of the old tex file (relative to the remote repo)
# $2 is the hash of the commit that we'd like to compare against
whophil /
Last active Apr 7, 2016
Docstring for Python method (NumPy-style, for Sphinx compatibility)
"""One line description of a module level function.
The longer, optionally multi-line description goes here. This may have multiple
sentences and multiple lines.
param1 : int
The first parameter.
param2 : Optional[str]
whophil /
Last active Apr 11, 2016
Sphinx extensions: autodoc, napoleon
sys.path.insert(0, os.path.abspath('.'))
extensions = [
whophil /
Last active Apr 11, 2016
Configuration for Sphinx readthedocs html theme.
# requires sphinx_rtd_theme to be installed on the build machine
# $ pip install sphinx_rtd_theme
import sphinx_rtd_theme
html_theme = "sphinx_rtd_theme"
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]