Skip to content

Instantly share code, notes, and snippets.

@r03ert0
r03ert0 / send_jitsi_data.html
Created October 19, 2020 07:58
Script showing how to send data through a Jitsi channel
<div>
<b>Message:</b>
<input
onchange="sendMessage(this.value)"
placeholder="Type and press enter to send message"
style="width: 640px"
/>
</div>
<div
id="info"
<link
rel="icon"
sizes="any"
href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Ccircle cx='5' cy='5' r='5' fill='grey'/%3E%3C/svg%3E"
>
Date Time Ada Katja Roberto
7/3/2020 14:59 37.2 36.6 36.4
/*
NPRC is a consortium of neuroscience journals that allows reviews done in one of them
to be shared with another, making the review process faster.
There is a webpage listing all participating journals, about 60. However, the website
will only show about 20 at a time, because of what I see as poor design. The following
code will get the list of journals and print them to the console as simple text.
*/
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script>
let i, url;
@r03ert0
r03ert0 / pdftosvg.sh
Created December 14, 2018 17:06
get svg from one page from a pdf
page=39
pdftocairo -svg -f $page -l $page full.pdf page-${page}.svg
cat page-${page}.svg |sed 's/^<image.*//'>page-${page}-img.svg
<html>
<head>
<meta charset="UTF-8">
<style>
#picture {
width:1rem;
height:1rem;
vertical-align:middle;
margin-right:0.5rem;
}
@r03ert0
r03ert0 / mesh_simplify.html
Created February 17, 2018 11:48 — forked from zz85/mesh_simplify.html
Fast Quadric Mesh Simplification JS port
<!DOCTYPE html>
<html lang="en">
<head>
<title>three.js webgl - modifier - Fast Quadric Mesh Simplification</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<style>
body {
font-family: Monospace;
background-color: #f0f0f0;
@r03ert0
r03ert0 / transformation.html
Last active January 25, 2018 19:22
Linear transformation of a fish, to celebrate the 100th anniversary of D'Arcy Thompson's On Growth And Form, http://bit.ly/2GhFftW
<html>
<body>
<style>
td {
width: 100px;
border:thin solid lightGrey;
}
</style>
<svg width="100%" height="400px" xmlns="http://www.w3.org/2000/svg">
<g transform="matrix(1,0,0,1,0,0)">
@r03ert0
r03ert0 / extend.js
Created December 7, 2017 11:06
`extend` function for javascript objects
/**
* @desc From https://gomakethings.com/merging-objects-with-vanilla-javascript/
*/
function extend() {
// Variables
var extended = {};
var deep = false;
var i = 0;
var length = arguments.length;
{
"pixelsPerMeter": 1000000,
"tileSources": [
"ftp://bigbrain.loris.ca/BigBrainRelease.2015/2D_Final_Sections/Coronal/Dzi/pm0001o.dzi"
]
}