Skip to content

Instantly share code, notes, and snippets.

View LenaicTerrier's full-sized avatar

Lénaïc LenaicTerrier

View GitHub Profile
@martinarroyo
martinarroyo / citationneeded.tex
Created June 1, 2015 22:10
A LaTeX macro that sets a Wikipedia-stylized "Citation Needed" template and outputs the counter of references with a surprise. Use with write18 enabled! and the Figures directory in \graphicspath{}!
\newcounter{undefinedreferences}
\setcounter{undefinedreferences}{0}
\newcommand{\citationneeded}[1][None]{\stepcounter{undefinedreferences}\textsuperscript{\color{blue} [Citation needed: #1]}}
\newcommand{\checkreferences}{
\ifnum\value{undefinedreferences} > 0
\begin{center}
\immediate\write18{wget -O Figures/protester.png -nc http://imgs.xkcd.com/comics/wikipedian_protester.png}
\includegraphics[width=\textwidth]{protester.png}
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Created: 2010/12/05
// Updated: 2018/09/12
// License: MIT
//
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it)
//
@wadey
wadey / twitter-entities.js
Created June 17, 2010 17:50
JavaScript parser for Tweet Entities
/*
* twitter-entities.js
* This function converts a tweet with "entity" metadata
* from plain text to linkified HTML.
*
* See the documentation here: http://dev.twitter.com/pages/tweet_entities
* Basically, add ?include_entities=true to your timeline call
*
* Copyright 2010, Wade Simmons
* Licensed under the MIT license