Skip to content

Instantly share code, notes, and snippets.

View 03c's full-sized avatar
🏠
Working from home

Chris Child 03c

🏠
Working from home
View GitHub Profile
sync-settings
@03c
03c / event.html
Last active January 28, 2021 16:24
RDFa Event Test
<div class="col-md-9" vocab="http://schema.org/" typeof="Event">
<a href="http://example.com/en/evenements/ebaii2021n2">
EBAII-N2 : 1ème Ecole de Bioinformatique AVIESAN - IFB - INSERM Niveau 2
</a>
<h3 property="name">
EBAII-N2 : 1ème Ecole de Bioinformatique AVIESAN - IFB - INSERM Niveau 2
</h3>
<div property="description" class="summary">
Initiation au traitement des données de génomique obtenues par
séquençage à haut débit -- Niveau 2
@03c
03c / gist:86b18b248949a345a128915b8c21d40b
Created January 7, 2021 15:35
testing rdfa doctype
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.1//EN"
"http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" version="XHTML+RDFa 1.1" dir="ltr">
<head profile="http://www.w3.org/1999/xhtml/vocab">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta content="width=device-width,initial-scale=1" name="viewport" />
<link rel="shortcut icon" href="https://ressources.france-bioinformatique.fr/sites/all/themes/IFB_3/favicon.ico" type="image/vnd.microsoft.icon" />
<meta name="generator" content="Drupal 7 (https://www.drupal.org)" />
<div vocab="http://schema.org/" typeof="Event" resource="#2021_05_06_rtidyverse">
<td>
<span property="startDate" content="2021-05-06">May 06, 2021</span><span style="display: none" property="endDate" content="2021-05-06">May 06, 2021</span></td>
<td>
<a href="https://elixir-luxembourg.org/events/2021_05_06_rtidyverse">Data processing with R tidyverse</a>
</td>
<td property="location" typeof="Place">
<span property="name">
Online
</span></td>
@03c
03c / trainingmaterial.html
Last active February 4, 2021 15:38
JSON-LD - TrainingMaterial
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "TrainingMaterial",
"@id": "https://docs.google.com/presentation/d/1_C2TTX_gYRxpVQjNEbuMm3YLfz6ouocGUxoioUCnG5I",
"dct:conformsTo": "https://bioschemas.org/profiles/TrainingMaterial/0.9-DRAFT-2020_12_08",
"description": "An introduction to the 10 simple rules for making training materials FAIR",
"keywords": "FAIR, Training Materials, Bioschemas, ELIXIR, Structured Markup",
"name": "Ten simple rules to make training materials FAIR",
"about": [
[{"@context":"http:\/\/schema.org","@type":"Event","name":"Metagenomics bioinformatics","start_date":"2021-11-8 00:00:00","endDate":"2021-11-12 00:00:00","description":"\u003Cp\u003ELearn about the tools, processes and analysis approaches used in the field of metagenomics.\u003C\/p\u003E\r\n\r\n\u003Cp\u003EThis course will cover the use of publicly available resources to manage, share, analyse and interpret metagenomics data; including marker gene, whole gene shotgun (WGS) and assembly-based approaches.\u003C\/p\u003E\r\n\r\n\u003Cp\u003EThe virtually-delivered content will involve participants learning via pre-recorded lectures followed by live Q\u0026amp;As with the trainers. Practical experience will be developed in group activities and in computational exercises run in Docker containers on our virtual training infrastructure.\u003C\/p\u003E\r\n","url":"https:\/\/www.ebi.ac.uk\/training\/events\/metagenomics-bioinformatics-virtual-2021","keywords":["DNA \u0026 RNA (dna-rna)"],"hostInstitution":{"@type":"O
// Based on https://github.com/LinusU/base32-encode/blob/master/index.js
function hex_to_b32(hex) { let alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"; let bytes = []; for (let i = 0; i < hex.length; i += 2) { bytes.push(parseInt(hex.substr(i, 2), 16)); } let bits = 0; let value = 0; let output = ''; for (let i = 0; i < bytes.length; i++) { value = (value << 8) | bytes[i]; bits += 8; while (bits >= 5) { output += alphabet[(value >>> (bits - 5)) & 31]; bits -= 5; } } if (bits > 0) { output += alphabet[(value << (5 - bits)) & 31]; } return output; };
// from https://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid#answer-2117523
function uuidv4() { return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8); return v.toString(16); }); }
// from https://gist.github.com/gboudreau/94bb0c11a6209c82418d01a59d958c93
function saveToFile(data, filename) { if (!data) { console.error('Console.save: No data'); return; } if (t
@03c
03c / index.html
Last active December 11, 2023 15:00
Code Point to Char
<!DOCTYPE html>
<html>
<head>
<title>Font Demo</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght@400&text=person" />
</head>
<body>
<span class="material-symbols-outlined">
person
</span>