Skip to content

Instantly share code, notes, and snippets.

# Makefile to convert media files to formats usable
# by pdfletex and beamer
.PHONY: videos figures clean all
## Target files ##
# collect media files in current directory:
epsFiles := $(wildcard *.eps)
svgFiles := $(wildcard *.svg)
aviFiles := $(wildcard *.avi)

Diffing PDFs for git

Visual difftool

One can use MD5 or plain text diff to see differences in PDF files. If that's not enough, here's how to use diffpdf which knows how to diff based on appearance or words.

  • apt-get install diffpdf
  • edit your ~/.gitconfig to add this:
[difftool "diffpdf"]
 cmd = diffpdf \"$LOCAL\" \"$REMOTE\"
@quantentunnels
quantentunnels / layouts
Last active December 3, 2016 20:48
Keyboard layouts
# Marius' Keyboard layouts
* ErgoDox Qwerty Kinesis mod with black DSA
http://www.keyboard-layout-editor.com/#/layouts/c5707cd171f028cc70fd105c404bdda3
Pulse Keycaps
http://www.keyboard-layout-editor.com/#/layouts/48c7b2ba340bde1fc0e032cc9c2f00d7
* Planck Qwerty
http://www.keyboard-layout-editor.com/#/layouts/196a676277f14a56f57e54c37e93c4e5
Pulse Keycaps
http://www.keyboard-layout-editor.com/#/layouts/6bfdf30fbc09d9d25c1bc55694dc7167
# Produce PDFs from all Markdown files in a directory
# Lincoln Mullen | http://lincolnmullen.com | [email protected]
# List files to be made by finding all *.md files and appending .pdf
PDFS := $(patsubst %.md,%.md.pdf,$(wildcard *.md))
# The all rule makes all the PDF files listed
all : $(PDFS)
# This generic rule accepts PDF targets with corresponding Markdown
function gitInfo=getGitInfo()
% Matlab script to get information about the Git repository in the current directory, including:
% - branch name of the current Git Repo
% -Git SHA1 HASH of the most recent commit
% -url of corresponding remote repository, if one exists
%
% The function first checks to see if a .git/ directory is present. If so it
% reads the .git/HEAD file to identify the branch name and then it looks up
% the corresponding commit.
%