This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "open4" | |
module Jekyll | |
class TikzBlock < Liquid::Block | |
def parse(tokens) | |
@nodelist ||= [] | |
@nodelist.clear | |
while token = tokens.shift |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Converts eastings and northings (British national grid coordinates) to Lat/Long | |
# | |
# Original code author: Hannah Fry; see code/comments here: | |
# http://www.hannahfry.co.uk/blog/2012/02/01/converting-british-national-grid-to-latitude-and-longitude-ii | |
# | |
from math import sqrt, pi, sin, cos, tan, atan2 as arctan2 | |
import csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
These commands are based on a askubuntu answer http://askubuntu.com/a/581497 | |
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below. | |
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING. | |
ABSOLUTELY NO WARRANTY. | |
If you are still reading let's carry on with the code. | |
sudo apt-get update && \ | |
sudo apt-get install build-essential software-properties-common -y && \ | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 11/27/2017 - Tweaked for a page redesign. | |
* 1/6/2018 - Handle videos in book bundle. | |
*/ | |
var pattern = /(MOBI|EPUB|PDF( ?\(H.\))?|CBZ)$/i; | |
var pattern2 = /(Download)$/; | |
var nodes = document.getElementsByTagName('a'); | |
var downloadCmd = ''; | |
for (i in nodes) { | |
var a = nodes[i]; | |
if (a && a.text && pattern.test(a.text.trim())) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% | |
% x=3*(minimum size)/2 | |
% x=\sqrt{3/4}*(minimum size)/2 | |
% | |
\usetikzlibrary{shapes.geometric} | |
\usetikzlibrary{calc} | |
\def\hexdia{1cm} |