- Download source files
- Run
npm installto install all dependencies. - Run
npm run buildto bundleapp.jsintobundle.js
- Open
index.htmlin a browser.
| // this is a big array of 76 items I need to split into groups of 10 | |
| const hugeArray = Array.from({ length: 76 }, (_, i) => i); | |
| function chunkify(array, chunkSize = 10) { | |
| // make a new array | |
| const chunks = Array.from( | |
| // give it however many slots are needed - in our case 8 | |
| // 1-7 with 10 items, and 8th slot will have 6 | |
| { length: Math.ceil(array.length / chunkSize) }, | |
| // this is a map function that will fill up our slots |
| "use strict"; | |
| [foo,bar] = TNG(foo,bar); | |
| // NOTE: intentionally not TNG(..) wrapping useBaz(), so that it's | |
| // basically like a "custom hook" that can be called only from other | |
| // TNG-wrapped functions | |
| function foo(origX,origY) { | |
| var [x,setX] = useState(origX); | |
| var [y,setY] = useState(origY); |
| export const GoogleApi = function(opts) { | |
| opts = opts || {} | |
| const apiKey = opts.apiKey; | |
| const libraries = opts.libraries || []; | |
| const client = opts.client; | |
| const URL = 'https://maps.googleapis.com/maps/api/js'; | |
| const googleVersion = '3.22'; | |
| let script = null; |
| const path = require("path") | |
| const fs = require("fs") | |
| // -- Webpack configuration -- | |
| const config = {} | |
| // Application entry point | |
| config.entry = "./src/server/index.js" |
| angular.module('utilsModule').filter("megaNumber", () => { | |
| return (number, fractionSize) => { | |
| if(number === null) return null; | |
| if(number === 0) return "0"; | |
| if(!fractionSize || fractionSize < 0) | |
| fractionSize = 1; | |
| var abs = Math.abs(number); |
| #include <unistd.h> | |
| #include <mach/mach.h> | |
| #include <mach/mach_vm.h> | |
| #include <mach-o/dyld.h> | |
| int | |
| main (int argc, char * argv[]) | |
| { | |
| volatile char * library; | |
| const mach_vm_size_t page_size = getpagesize (); |
| // moment.js locale configuration | |
| // locale : brazilian portuguese (pt-br) | |
| // author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira | |
| (function (factory) { | |
| if (typeof define === 'function' && define.amd) { | |
| define(['moment'], factory); // AMD | |
| } else if (typeof exports === 'object') { | |
| module.exports = factory(require('../moment')); // Node | |
| } else { |
| var gulp = require('gulp'), | |
| sass = require('gulp-sass'), | |
| browserify = require('gulp-browserify'), | |
| concat = require('gulp-concat'), | |
| embedlr = require('gulp-embedlr'), | |
| refresh = require('gulp-livereload'), | |
| lrserver = require('tiny-lr')(), | |
| express = require('express'), | |
| livereload = require('connect-livereload') | |
| livereloadport = 35729, |