Skip to content

Instantly share code, notes, and snippets.

View Conal-Tuohy's full-sized avatar

Conal Tuohy Conal-Tuohy

View GitHub Profile
/* An HTML template in 180 bytes (minified)
Features: Escapes HTML, accepts either strings or functions as values, and that's all (it doesn't handle looping).
Usage:
OneEightyT(
"<h1>{name}</h1><div>{content} @ {currentTime}</div>",
{
name: "Stella",
@lawlesst
lawlesst / fuseki-fulltext-config.ttl
Last active November 15, 2021 16:45
Minimal working Fuseki TDB with with full text search.
@prefix : <http://localhost/jena_example/#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix tdb: <http://jena.hpl.hp.com/2008/tdb#> .
@prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
@prefix text: <http://jena.apache.org/text#> .
@prefix fuseki: <http://jena.apache.org/fuseki#> .
## Example of a TDB dataset and text index
## Initialize TDB
@inexorabletash
inexorabletash / @ Indexed DB URLs via Service Workers.md
Last active December 20, 2023 01:29
Indexed DB URLs via Service Workers

URLs into Indexed DB, via Service Workers

Let's say you're using Indexed DB for the offline data store for a catalog. One of the object stores contains product images. Wouldn't it be great if you could just have something like this in your catalog page?

<img src="indexeddb/database/store/id">
@subfuzion
subfuzion / github-wiki-how-to.md
Last active July 14, 2024 05:33
GitHub Wiki How-To

How do I clone a GitHub wiki?

Any GitHub wiki can be cloned by appending wiki.git to the repo url, so the clone url for the repo https://myorg/myrepo/ is: git@github.com:myorg/myrepo.wiki.git (for ssh) or https://github.com/my/myrepo.wiki.git (for https).

You make edits, and commit and push your changes, like any normal repo. This wiki repo is distinct from any clone of the project repo (the repo without wiki.get appended).

How do I add images to a wiki page?

@VladimirAlexiev
VladimirAlexiev / 0README.md
Last active December 24, 2016 02:56
How Not To Do Linked Data
@wragge
wragge / infrastructure-post.md
Last active June 14, 2018 12:28
Text of a Facebook post in the Australian Historical Association group, 14 June 2018.

Posted to Australian Historical Association Facebook group, 14 June 2018

Recent government decisions about research infrastructure funding are, of course, disappointing for the humanities — particularly those of us who have working in the digital realm. But we need to remember that at it’s heart infrastructure is people, and there is much we can do now — right now, starting today — to support and develop capacity for digital research in the humanities. For example:

  • Ensure that people get appropriate recognition for digital projects in hiring and promotion processes. The Modern Language Assoc and the American Historical Assoc have both developed guidelines around this — it would be great to see this addressed in Australia.

  • Find ways to reward and encourage openness in the sharing of skills, tools, resources, data, and code. I have learnt so much through the generosity of others in the DH community, but we nee

@Jay-Madden
Jay-Madden / onefetch.sh
Last active August 17, 2023 12:36
Bash script to display onefetch every time you navigate locally to a new repository
# Call onefetch if we navigate to a new repository
LAST_REPO=""
cd() {
builtin cd "$@";
git rev-parse 2>/dev/null;
if [ $? -eq 0 ]; then
if [ "$LAST_REPO" != $(basename $(git rev-parse --show-toplevel)) ]; then
onefetch
LAST_REPO=$(basename $(git rev-parse --show-toplevel))