Skip to content

Instantly share code, notes, and snippets.

@guimondmm
guimondmm / betterAPAfootcites.tex
Created November 24, 2018 01:52
Better footnote citations and text citations for biblatex-apa 7.7
% This code snippet patches bugs with \footcite(s) and \textcite(s) in biblatex-apa 7.7 <https://ctan.org/pkg/biblatex-apa>
% The biblatex-apa package is (c) 2018 Philip Kime, licensed under LPPL v1.3 <http://www.latex-project.org/lppl.txt>
% The default behaviour of \footcite is more akin to \cite than \textcite, and it looks jarring when the latter is also used.
% Additionally, biblatex-apa prints extraneous spaces, commas or semi-colons when using \textcites and \footcites.
% Just paste the following code in your preamble:
\DeclareAutoCiteCommand{footnote}[f]{\footcite}{\footcites}% allows the use of [autocite=footnote] (cf. biblatex doc 3.1.1)
\DeclareCiteCommand{\footcite}[\mkbibfootnote]% redefines \footcite to use textcite (i.e. year & postnote in parentheses)
{\renewcommand{\compcitedelim}{}% removes extraneous comma
\bibsentence\usebibmacro{cite:init}\usebibmacro{prenote}}
{\usebibmacro{citeindex}\usebibmacro{textcite}}{}
@guimondmm
guimondmm / findFacebookPosts.py
Created March 21, 2018 14:01
Find stubborn Facebook posts that won't delete from the Activity Log. Those posts might reappear on your Timeline if they are not fully deleted.
#!/usr/bin/env python3
## Find stubborn Facebook posts that won't delete from the Activity Log.
## Those posts might reappear on your Timeline if they are not fully deleted.
import http, json, sys, webbrowser
try:
import requests
except ImportError:
sys.exit("\x1b[1;33mPlease install the \"requests\" module using\n$ pip3 install requests\x1b[0m")
try: