Skip to content

Instantly share code, notes, and snippets.

Working from home

Ting Sun sunt05

Working from home
View GitHub Profile
View A hack for showing LaTeX formulas in GitHub


A lot of GitHub projects need to have pretty math formulas in READMEs, wikis or other markdown pages. The desired approach would be to just write inline LaTeX-style formulas like this:

$e^{i \pi} = -1$

Unfortunately, GitHub does not support inline formulas. The issue is tracked here.


myusuf3 /
Created Nov 3, 2014
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
View Notes of

Notes of compiling and running WRF-SUEWS on JASMIN

Some often used Linux commands:

ls list files
ls -l
which identify the location of a executable
mkdir create directory
wget download from url: e.g. $ wget -O ~/path/file.tar\

kristopherjohnson / Makefile
Last active Oct 10, 2020
Makefile that uses Pandoc to generate HTML, PDF, DOCX, etc. from Markdown source files
View Makefile
# Makefile
# Converts Markdown to other formats (HTML, PDF, DOCX, RTF, ODT, EPUB) using Pandoc
# <>
# Run "make" (or "make all") to convert to all other formats
# Run "make clean" to delete converted files
# Convert all files in this directory that have a .md suffix
guysmoilov / Git pre-commit hook for large
Last active Oct 9, 2020
Git pre-commit hook for large files
View Git pre-commit hook for large

Git pre-commit hook for large files

This hook warns you before you accidentally commit large files to git. It's very hard to reverse such an accidental commit, so it's better to prevent it in advance.

Since you will likely want this script to run in all your git repos, a script is attached to add this hook to all git repos you create / clone in the future.

Of course, you can just download it directly to the hooks in an existing git repo.


Standalone python script for QGIS3 on OSX.
import os
import sys
# Define plugin locations from QGIS3
# Define Qt5 plugin path since Qt5 can't find it
nl5887 /
Last active Jul 17, 2020
Bash and zsh alias for Transfers files and directories to
function transfer
if test (count $argv) -eq 0
echo "No arguments specified. Usage:\necho transfer /tmp/\ncat /tmp/ | transfer"
return 1
## get temporarily filename, output is written to this file show progress can be showed
set tmpfile ( mktemp -t transferXXX )
## upload stdin or file
gwijthoff /
Last active Jul 14, 2020 — forked from aaronwolen/
A Pandoc template to generate reveal.js slideshows.


This is a Pandoc template to generate reveal.js slideshows.


Pandoc is a "universal markup converter" you can run from the command line to convert a simple, plain text file into a beautifully formatted PDF, .docx, HTML, LaTeX, slideshows… the list goes on.

reveal.js is a CSS and JavaScript framework for creating beautiful presentations in HTML5, designed by Hakim El Hattab.

agathe / gist:2956101
Created Jun 19, 2012
VBA Excel - Convert each sheet to CSV - For MAC
View gist:2956101
Function SaveAllSheetsAsCSV(outputPath As String)
On Error GoTo Heaven
' each sheet reference
Dim Sheet As Worksheet
' path to output to
'Dim outputPath As String
' name of each csv
Dim OutputFile As String
You can’t perform that action at this time.