Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Stupid script to render LaTeX from Authorea to PDF, RTF, ODF and HTML.
# I can't get Authorea to reliably render things, so
# it looks like I'll have to do it myself. I was really
# hoping to avoid learning LaTeX et al, so this is
# an Ugly Hack.
# The commands pdflatex and bibtex are repeated as per:
#!/bin/bash
# As per http://steady.org/2013/06/19/exporting-evernote-notes-to-plain-text-files-part-1/
# First, check how many Evernote notes you have. You need to know that number.
# Rename your .enex file to evernote.xml
# Create a tidy.conf file that looks something like this:
# output-xml: yes
# input-xml: no
/* Edits by Austin 2015 */
/* See https://gist.github.com/austinjp/c04785162ac6ddae3f8c */
/* ######################### Edin theme tweaks ############################# */
#colophon {
display: none !important;
}
h1.site-title {
#!/bin/bash
# If this script fails you may have carriage returns at the end of each line. Try:
# sed -i -e 's/^M//g' batch.sh
# ... where you can create the ^M character by typing control-v control-m
# Then of course:
# chmod +x batch.sh
# Relies on some pandoc filters:
# https://github.com/tomduck/pandoc-fignos
@austinjp
austinjp / gitbook-one-pager.sh
Created August 23, 2016 18:17
Creates a single page that includes every file. Outputs "onepage.md". You need to add this to your SUMMARY.md (or equivalent) for gitbook to render it.
#!/bin/bash
# Expand current directory to absolute path:
declare wd="."
declare wd=$( cd $(dirname $wd) ; pwd -P )
declare filelistfile="/tmp/onepager.txt"
# FIXME use $wd in redirect
@austinjp
austinjp / my.cnf
Created November 5, 2016 10:53
MySQL config for a box/container with minimal resources
# Based on http://pastie.org/pastes/8665237/text
# Generated by Percona Configuration Wizard (http://tools.percona.com/) version REL5-20120208
[mysql]
# CLIENT #
port = 3306
socket = /var/run/mysqld/mysqld.sock

Keybase proof

I hereby claim:

  • I am austinjp on github.
  • I am austinjp (https://keybase.io/austinjp) on keybase.
  • I have a public key ASBy6Q1xn72bA6hOIwOOHeAulDC5dLdYmgBLLfFbaTqRQgo

To claim this, I am signing this object:

@austinjp
austinjp / migrate-from-github-to-bitbucket.sh
Last active March 26, 2018 11:54 — forked from niksumeiko/git.migrate
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
set -euo pipefail
read -p "Github repo to clone: " gh
read -p "Bitbucket destination: " bb
read -p "Github username: " ghu
read -p "Bitbucket username: " bbu
git clone https://github.com/$ghu/$gh
@austinjp
austinjp / EdgarBuildNotes.txt
Created April 2, 2018 16:56 — forked from atiensivu/EdgarBuildNotes.txt
Dual boot Ubuntu 17.10 alpha on Chromebook 14 (EDGAR) 4GB model (CB3-431-C5FM)
# A roundabout way to get Ubuntu Artful alpha (17.10) on EDGAR (Acer Chromebook 14 4GB version - CB3-431-C5FM)
# Install missing 'legacy' BIOS piece to enable Ctrl-L on boot:
cd; curl -LOk https://mrchromebox.tech/firmware-util.sh && sudo bash firmware-util.sh
# Install Galliumos (nightly - as of 09/09/2017)
# https://wiki.galliumos.org/Installing
cd; curl -LOk https://chrx.org/go && sh go -d galliumos -e desktop -r nightly -v
@austinjp
austinjp / pandoc-newpage.pl
Last active September 3, 2018 17:33 — forked from bpj/pandoc-newpage.pl
Pandoc filter which converts LaTeX \newpage commands into appropriate pagebreak markup for other formats.
#!/usr/bin/env perl
# Pandoc filter which converts paragraps containing only the LaTeX
# `\newpage` or `\pagebreak` command into appropriate pagebreak markup
# for other formats.
#
# You will need perl version 5.10.1 or higher <https://www.perl.org/get.html>
# (Strawberry Perl recommended on Windows!)
# and a module installer <http://www.cpan.org/modules/INSTALL.html>
# and the Pandoc::Elements module version 0.33 or higher