Skip to content

Instantly share code, notes, and snippets.

Roberto Toro r03ert0

Block or report user

Report or block r03ert0

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View nprc-index.html
/*
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 Dec 14, 2018
get svg from one page from a pdf
View pdftosvg.sh
page=39
pdftocairo -svg -f $page -l $page full.pdf page-${page}.svg
cat page-${page}.svg |sed 's/^<image.*//'>page-${page}-img.svg
View firebase-test.html
<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 Feb 17, 2018 — forked from zz85/mesh_simplify.html
Fast Quadric Mesh Simplification JS port
View mesh_simplify.html
<!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 Jan 25, 2018
Linear transformation of a fish, to celebrate the 100th anniversary of D'Arcy Thompson's On Growth And Form, http://bit.ly/2GhFftW
View transformation.html
<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 Dec 7, 2017
`extend` function for javascript objects
View extend.js
/**
* @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;
View bb2.json
{
"pixelsPerMeter": 1000000,
"tileSources": [
"ftp://bigbrain.loris.ca/BigBrainRelease.2015/2D_Final_Sections/Coronal/Dzi/pm0001o.dzi"
]
}
View token_stop.js
app.post('/api/stop', tokenAuthentication, (req, res) => {
console.log('hello', req.body);
if( req.isTokenAuthenticated ) {
console.log("Stopped by", req.tokenUsername);
process.exit();
} else {
console.log("Token required");
}
res.send();
});
View bb.jsonp
f({
"tileSources": [
{
"width": 6572,
"tileSize": 256,
"getTileUrl": "function(level,x,y){ return \"ftp://bigbrain.loris.ca/BigBrainRelease.2015/2D_Final_Sections/Coronal/Dzi/pm2886o_files/\"+level+\"/\"+x+\"_\"+y+\".png\"}",
"tileOverlap": 0,
"height": 5711
}
],
View bigbrain_slice.jsonp
f()(return {
"pixelsPerMeter": 1000000,
"tileSources": [
"ftp://bigbrain.loris.ca/BigBrainRelease.2015/2D_Final_Sections/Coronal/Dzi/pm0001o.dzi"
]
};)
You can’t perform that action at this time.