Then install truffle
npm install --global truffleCreate metacoin example project
| function findNearestMatches(data, target, windowSize) { | |
| /* | |
| * Find [windowSize] items closest to [target] value | |
| * | |
| * var arr = [0,1,2,3,4,5]; | |
| * findNearestMatches(arr, 2, 3) | |
| * -> [1,2,3] | |
| * findNearestMatches(arr, -5, 4) | |
| * -> [0,1,2.3] | |
| */ |
Then install truffle
npm install --global truffleCreate metacoin example project
| // paste this in your browser's JS console for a better viewing and clicking experience | |
| var style = document.createElement('style'); | |
| style.innerHTML = '@keyframes spin {from {transform:rotate(0deg);} to {transform:rotate(359deg);} } @keyframes spinrev {from {transform:rotate(0deg);} to {transform:rotate(-359deg);} }'; | |
| document.head.appendChild(style); | |
| document.body.addEventListener('click', function(event) { | |
| event.preventDefault(); | |
| var target = event.target; | |
| var spin = (Math.random() < 0.5) ? 'spin' : 'spinrev'; | |
| target.style.animation = spin + ' 4s infinite linear'; | |
| }); |
| var dang = {dang: '', haha: '', whoops: undefined, whatever: false, hehe: [{what: '', lol: true, ok: false, wow: {haha: 'false', word: [], up: '', ok: false }, why: 0 }, null, 'lol' - 42] }; | |
| function omitValuesRecursive(obj, omittedValues) { | |
| var omittedValues = omittedValues || ['', undefined, null]; | |
| if (window._) { | |
| return scrubEmptyFieldsLodash(obj); | |
| } | |
| return scrubEmptyFields(obj); | |
| // recursively remove omitted values from the object. modifies the original object | |
| function scrubEmptyFields(obj) { |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Minimal bootstrap tab pane setup</title> | |
| </head> | |
| <style> | |
| .tab-pane { | |
| display: none; | |
| } | |
| .tab-pane.active { |
| var DB = {}; | |
| function Base(data) { | |
| for (var key in data) { | |
| this[key] = data; | |
| } | |
| } | |
| Base.prototype.save = function() { | |
| DB[Math.random().toString()] = this.serialize(); | |
| }; |
| // made this because I got tired of trying to scroll on a website that used this widget. | |
| // only tested on node 10.1.0 | |
| 'use strict'; | |
| var TINROOF_WIDGET_URL = 'https://www.reverbnation.com/widget_code/html_widget/venue_1008205?widget_id=52'; | |
| var https = require('https'); | |
| // allow optional `--json` arg to just display the json; | |
| var handler = displayData; | |
| if (process.argv[2] === '--json') { | |
| handler = saveJson; |
| “ | |
| ” | |
| ’ | |
| Ê |
| # list disks | |
| diskutil list | |
| # unmount the unsorted drive | |
| diskutil unmount /dev/disk2s1 | |
| # do the thing | |
| fatsort /dev/disk2s1 |
I hereby claim:
To claim this, I am signing this object: