Skip to content

Instantly share code, notes, and snippets.

@hubgit
hubgit / journal-feeds.csv
Created April 24, 2013 15:50
All the journal feeds in JournalTOCs
We can't make this file beautiful and searchable because it's too large.
publisher id,feed id,feed url,journal url,journal title
1050,28092,http://journals.uran.ua/eejet/gateway/plugin/WebFeedGatewayPlugin/rss,http://journals.uran.ua/eejet/,"Східно-Європейський журнал передових технологій : Eastern-European Journal of Enterprise Technologies"
1761,25094,http://feeds.feedburner.com/Archeomatica?format=xml,http://www.archeomatica.it/,Archeomatica
1739,24698,http://cerealchemistry.aaccnet.org/action/showFeed?ui=0&mi=3b39wk&ai=rs&jc=cchem&type=etoc&feed=rss,http://cerealchemistry.aaccnet.org/journal/cchem,"Cereal Chemistry"
1721,27750,http://journals.aau.dk/index.php/MIPO/gateway/plugin/WebFeedGatewayPlugin/rss,http://journals.aau.dk/index.php/MIPO,"Musikterapi i Psykiatrien Online"
1549,26667,http://ojs.statsbiblioteket.dk/index.php/bras/gateway/plugin/WebFeedGatewayPlugin/rss,http://ojs.statsbiblioteket.dk/index.php/bras,"Brasiliana - Journal for Brazilian Studies"
1549,27775,http://ojs.statsbiblioteket.dk/index.php/claw/gateway/plugin/WebFeedGatewayPlugin/rss,http://ojs.statsbiblio
@hubgit
hubgit / container.sh
Created June 20, 2025 22:21
Open the current directory in a Docker container
# Open the current directory in a Docker container
function container() {
IMAGE=${1:-ubuntu:questing}
echo "Opening $PWD in $IMAGE"
docker run --rm -it -v "$PWD":/workspace -w /workspace "$IMAGE" bash
}
@hubgit
hubgit / index.html
Last active June 16, 2025 07:38
Render the text of a PDF with PDF.js
<!doctype html>
<meta charset="utf-8">
<title>Render the text of a PDF with PDF.js</title>
<style>
.page-container {
box-shadow: 0 1px 3px #444;
position: relative;
font-size: 1px;
line-height: 1;
@hubgit
hubgit / tex.sh
Last active June 15, 2025 20:43
Convert tex.web to tex.pa
# install Free Pascal
brew install fpc
wget --no-verbose http://mirrors.ctan.org/systems/knuth/dist.zip
wget --no-verbose http://mirrors.ctan.org/systems/knuth/local.zip
wget --no-verbose http://mirrors.ctan.org/systems/unix/tex-fpc.zip
unzip '*.zip'
cd tex-fpc/
@hubgit
hubgit / .zshrc
Created June 15, 2025 20:14
Open the current directory in a Docker container (zsh function)
# Open the current directory in a Docker container
function container() {
IMAGE=${1:-ubuntu:questing}
echo "Opening $PWD in $IMAGE"
docker run --rm -it -v "$PWD":/workspace -w /workspace "$IMAGE" bash
}
# Open the current directory in a Docker container (amd64)
function containeramd() {
IMAGE=${1:-ubuntu:questing}
@hubgit
hubgit / README.md
Last active May 12, 2025 09:45
A5 printed card with HTML + CSS
  1. Clone this Gist.
  2. For card sizes other than A5, edit the size value in @page, and the height and width properties of body.
  3. Add contents to each face. The simplest approach is to add an image called front.png of the same dimensions as the card.
  4. Generate a PDF from the HTML + CSS. If using Prince, it's as simple as prince index.html card.pdf.
  5. Take the PDF to a printer, and ask them to print as many copies as you need.
@hubgit
hubgit / index.html
Last active April 6, 2025 16:37
Expand a textarea to fit its content, between a minimum ("rows" attribute) and maximum ("max-rows" attribute) number of rows.
<script src="https://code.jquery.com/jquery-2.2.2.min.js"></script>
<script src="textarea-max-rows.js"></script>
<style>textarea { width: 100%; }</style>
<textarea rows="5" max-rows="20" placeholder="Enter content to see the textarea expanding…"></textarea>
@hubgit
hubgit / SelectField.tsx
Last active March 31, 2025 22:59
Use react-select with Formik
import { FieldProps } from 'formik'
import React from 'react'
import Select, { Option, ReactSelectProps } from 'react-select'
export const SelectField: React.SFC<ReactSelectProps & FieldProps> = ({
options,
field,
form,
}) => (
<Select
@hubgit
hubgit / README.md
Last active March 11, 2025 17:21
Remove metadata from a PDF file, using exiftool and qpdf. Note that embedded objects may still contain metadata.

Anonymising PDFs

PDF metadata

Metadata in PDF files can be stored in at least two places:

  • the Info Dictionary, a limited set of key/value pairs
  • XMP packets, which contain RDF statements expressed as XML

PDF files

prefix publisher journals dois
10.12679 0 0
10.7579 123Doc Education 0 0
10.3731 21st Century COE Program (Toplogical Science and Technology) 1 40
10.5775 A. I. Rosu Cultural Scientific Foundation Fundatia cultural-stiintifica A. I. Rosu 1 80
10.4037 AACN Publishing 2 766
10.1306 AAPG/Datapages 4 21817
10.3183 AB Svensk Papperstidning 1 1550
10.5769 ABEAT - Associacao Brasileira de Especialistas em Alta Tecnologia 1 57
10.7597 ACOPIOS - Revista Iberica de Mineralogia 1 9