Skip to content

Instantly share code, notes, and snippets.

@theowoo
theowoo / Code.gs
Last active March 16, 2019 22:09
Google Doc add-on to insert a template to the top of the document
/*
Google Doc add-on to prepend a template to the top of the document.
Based on this appending function: https://stackoverflow.com/a/38556448
Support renumbering of ordered (numbered) list.
Usage:
Replace <GOOGLE DOC TEMPLATE URL> with the URL of the template document.
Open the target document, go to Tools > Script editor.
Paste this script into Code.gs.
Reload the target document, the add-on will be found under Add-ons menu.
@theowoo
theowoo / sshJupyter.md
Last active September 23, 2016 09:20
Setting up ipyparallel for using the linux clusters via ssh for jupyter

Open a terminal that supports SSH (e.g. Git Bash). Check that login is successful:

ssh <user>@<ip of remote machine>

You should get prompted for passwword.

Password-less SSH

SSH alias

Push an individual file from a repo to a new repo and keep command history associated with that file:

git clone <original repo url> temp-repo
cd temp-repo
git remote rm origin
git rm -rf .
git checkout HEAD -- <filename>
git commit -m "<commit message>"
git remote add origin <new repo url> # comments
git pull