This gist is updated daily via cron job and lists stats for npm packages:
- Top 1,000 most depended-upon packages
- Top 1,000 packages with largest number of dependencies
- Top 1,000 packages with highest PageRank score
| /** | |
| * This is a sample webhook server that listens for webhook | |
| * callbacks coming from Trello, and updates any cards that are | |
| * added or modified so everyone knows they are "PRIORITY" | |
| * | |
| * To get started | |
| * * Add your key and token below | |
| * * Install dependencies via `npm install express request body-parser` | |
| * * Run `node app.js` on a publicly visible IP | |
| * * Register your webhook and point to http://<ip or domain>:3123/priority |
| { fontWeight: '100' }, // Thin | |
| { fontWeight: '200' }, // Ultra Light | |
| { fontWeight: '300' }, // Light | |
| { fontWeight: '400' }, // Regular | |
| { fontWeight: '500' }, // Medium | |
| { fontWeight: '600' }, // Semibold | |
| { fontWeight: '700' }, // Bold | |
| { fontWeight: '800' }, // Heavy | |
| { fontWeight: '900' }, // Black |
| /** | |
| Taken from: http://stackoverflow.com/questions/588040/window-onload-vs-document-onload | |
| According to Parsing HTML documents - The end, | |
| The browser parses the HTML source and runs deferred scripts. | |
| A DOMContentLoaded is dispatched at the document when all the HTML has been parsed and have run. The event bubbles to the window. | |
| The browser loads resources (like images) that delay the load event. | |
| A load event is dispatched at the window. | |
| Therefore, the order of execution will be | |
| DOMContentLoaded event listeners of window in the capture phase | |
| DOMContentLoaded event listeners of document |
| const curry = fn => (...args) => fn.bind(null, ...args); | |
| const map = curry((fn, arr) => arr.map(fn)); | |
| const join = curry((str, arr) => arr.join(str)); | |
| const toLowerCase = str => str.toLowerCase(); | |
| const split = curry((splitOn, str) => str.split(splitOn)); |
| // Deep Equality comparison example | |
| // | |
| // This is an example of how to implement an object-comparison function in | |
| // JavaScript (ES5+). A few points of interest here: | |
| // | |
| // * You can get an array of all an object's properties in ES5+ by calling | |
| // the class method Object.keys(obj). | |
| // * The function recursively calls itself in the for / in loop when it | |
| // compares the contents of each property | |
| // * You can hide a "private" function inside a function of this kind by |
| import React, {Component} from 'react'; | |
| import {TextInput, View, Keyboard} from 'react-native'; | |
| import {Constants, Notifications, Permissions} from 'expo'; | |
| export default class Timer extends Component { | |
| onSubmit(e) { | |
| Keyboard.dismiss(); | |
| const localNotification = { | |
| title: 'done', |
This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
| import React from 'react'; | |
| import { NetworkProvider } from './NetworkProvider'; | |
| import { ExampleComponent } from './ExampleComponent'; | |
| export default class App extends React.PureComponent { | |
| render() { | |
| return ( | |
| <NetworkProvider> | |
| <ExampleComponent /> |