Skip to content

Instantly share code, notes, and snippets.

View blahah's full-sized avatar

Rik blahah

View GitHub Profile
@blahah
blahah / getwileydoi.sh
Created May 19, 2016 04:48
download a wiley PDF by DOI
#!/bin/sh
wget \
--header "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36" \
--verbose \
--save-cookies cookies.txt \
--keep-session-cookies \
--content-disposition \
http://onlinelibrary.wiley.com/doi/$1/pdf \
-O `echo "$1" | tr '/' '☍'`.pdf
@blahah
blahah / README.md
Created April 17, 2016 07:34
Comparison of embedded NoSQL databases that can be emedded in a Node.js - Electron app

Making an Electron app and want to embed a database? Here's a table to help you choose the right database software.

Work in progress

Project Language NPM package? Flat file? In memory? Full-text search? Maturity Embedded size Dependencies
NeDB Javascript Yes Always No High Low Simple
Lunr Javascript No Yes Yes High Tiny None
Search-index Javascript
Sqlite3 C Yes No Yes (fts extens
@blahah
blahah / 1_basic_browser.js
Last active February 8, 2023 09:04
loading geoJSON examples
// we have a geoJSON file (in this case for Guinea) on the web:
var guinea = 'https://raw.githubusercontent.com/johan/world.geo.json/master/countries/GIN.geo.json'
// and we have a function that does something with the geoJSON file:
var handleGeoJSON = function (data) {
// data is the JSON parsed into a JS object
console.log(data)
}
// using jquery (you must have loaded jQuery first) - http://api.jquery.com/jquery.getjson
@blahah
blahah / 10kb.random
Created July 21, 2022 17:40
random 10kb text file
rYau27jmONOO0WWV1t3KV6dhlKpbqRyHMGFrhqchhN3d19BFNvAl2vtjuexPx5kUIuVR6KItBZBD
/UhbRu0nyNqXm3uH3Uw6jPngEmKt/SaHr1BIZUeMtarG6eWlxUz6Jduj377RsxYQtYA0TKlZBNnU
4/93/irOOSG+F4dGcGBUeCAyGtlF6yEFIyn3aU1TX5p5dISyysX+4uhz3CD6PFxo8sThBCO1sIYL
y6D91AQz4eWIMyXqGtS0xxY8kEblTaRKpZlqb8CU1PTOvVXnjX+ggi3gNFKzAOXRKR64IOwZAeUT
loD1SF+QmipZ04Mgf1mElmPSuSdhrtCxHW5hmgvzostRe/LR8GC2Y6ENsa1dM3A7sgI0T7OvGnd9
SOYbvI4NrqdfDb+wlAJPEV7TCnlB8BVOYJApfrNNzIBxmhugHSigjDD1zQHcT/IDsrR+36tcC+qX
TlIERfXj/YQeDeXhIshARiTLDoQXm1pjn7CSfTP4FXfwS4QIR6b6MwMU7r2+TQ56CEjdGPEuXhvg
5XshpCukSK1zZn/4UaxCozsuK/ubmNqiDzL+6dUaRVmd9eMrQ974oyvo3MGaFq0jdSjdJiKU/+YH
UmBwtT9E3DdUbuCzGPWB9eiRi7Rdsn98PR3kKXgNyNS7VinsyOTOrUC35x3/iK24KCzoZiliGd+s
isokDsvi1u/jhbzZc6RjpP5LG8FdIA21FYL9vmcdztSn9tWoZDutm5h1aVo/CsXerFfAb9WGxSGd
@blahah
blahah / print_code.Rmd
Last active May 4, 2022 15:42
Print marked-up, unevaluated code from another file using Rmarkdown / knitr
---
title: "test"
author: "Richard Smith-Unna"
date: "21 May 2015"
output: html_document
---
Demo of reading an R file and dumping it raw into the HTML produced by knitr from RMarkdown, to get syntax highlighting.
Put the code you want to display in `import.R`.
@blahah
blahah / unix.md
Created November 25, 2014 08:35
Unix for biologists

Title: Unix Primer for Biologists Authors: Keith Bradnam & Ian Korf Date: September 27, 2012 Web: unixandperl.com Address: Genome Center, UC Davis, Davis, CA, 95616

Unix and Perl Primer for Biologists

Keith Bradnam & Ian Korf

@blahah
blahah / response_to_wiley_fake_dois.md
Last active January 27, 2021 16:12
Reply to Wiley's claim that they "do not create fake DOIs"
dat://6d8edce490908c12d3acc38b93ec1973395cf299b44094c99c1e5d0f618654f6
@blahah
blahah / 00_README.md
Last active November 16, 2020 06:56
_Dendrosenecio_ molecular phylogeny (chloroplast genome)