- cleaning the DOM/HTML/SVG/MathML: https://github.com/cure53/DOMPurify
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Error: dlopen(/Applications/ScienceFair.app/Contents/Resources/app/node_modules/sodium-native/prebuilds/darwin-x64/node-51.node, 1): Library not loaded: @loader_path/libsodium.dylib | |
Referenced from: /Applications/ScienceFair.app/Contents/Resources/app/node_modules/sodium-native/prebuilds/darwin-x64/node-51.node | |
Reason: no suitable image found. Did find: | |
/Applications/ScienceFair.app/Contents/Resources/app/node_modules/sodium-native/prebuilds/darwin-x64/libsodium.dylib: code signature invalid for '/Applications/ScienceFair.app/Contents/Resources/app/node_modules/sodium-native/prebuilds/darwin-x64/libsodium.dylib' | |
/Applications/ScienceFair.app/Contents/Resources/app/node_modules/sodium-native/prebuilds/darwin-x64/libsodium.dylib: code signature invalid for '/Applications/ScienceFair.app/Contents/Resources/app/node_modules/sodium-native/prebuilds/darwin-x64/libsodium.dylib' | |
at Object.Module._extensions..node (module.js:598:18) | |
at Module.load (module.js:488:32) | |
at tryModuleLoad (module.js:447 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yarn config set yarn-offline-mirror ~/./npm-packages-offline-cache && \ | |
yarn config set ignore-optional true && \ | |
yarn config set prefer-offline true && \ | |
yarn config set yarn-offline-mirror-pruning true | |
npm config set cache-min Infinity |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(ggplot2) | |
install.packages('hexbin') | |
cars <- mtcars | |
cars$car <- rownames(mtcars) | |
cars <- cars[with(cars, order(hp)), ] | |
cars$car <- factor(cars$car, levels = cars$car) | |
cars$cyl[cars$cyl == 4] <- '4 cylinders' | |
cars$cyl[cars$cyl == 6] <- '6 cylinders' | |
cars$cyl[cars$cyl == 8] <- '8 cylinders' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const config = require('config') | |
const rp = require('request-promise-native') | |
const Busboy = require('busboy') | |
const temp = require('temp').track() | |
const fs = require('fs') | |
const path = require('path') | |
const promiseRetry = require('promise-retry') | |
let inkConfig = config.get('pubsweet-component-ink-backend') | |
let inkEndpoint = inkConfig.inkEndpoint |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm init -y | |
npm install mkdirp blahah/hyperdrive dat-storage folder-walker through2 hyperdiscovery pumpify untildify |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hephaestus:hypercore rik$ npm run bench | |
> [email protected] bench /Users/rik/c/mafintosh/hypercore | |
> cd bench && ./all.sh | |
> git checkout a54dcf9 | |
# clearing cache | |
> rm -rf cores |