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
| # First, we need to find our device. BEFORE inserting your USB drive, run the | |
| # following: | |
| diskutil list | |
| # This will output a bunch of info about all of the disk drives connected to | |
| # your Mac. Each entry will have a header in the form "/dev/diskX", where X is | |
| # some number starting at 0. Now, insert your USB drive and run the command | |
| # again. You should see a new entry. Make note of the name (ie, /dev/diskX). | |
| diskutil list |
| const { compose, mapProps, withHandlers, lifecycle } = Recompose; | |
| const { observable, action } = mobx; | |
| const { inject, observer, Provider } = mobxReact; | |
| const { PropTypes } = React; | |
| // store | |
| // ============================ | |
| const counterStore = observable({ | |
| // for primitive values, wrap the value inside a observable, | |
| // or wrap it in an plain js object |
| /** | |
| * HighlightableImage.js | |
| * | |
| * If we simply change the source prop of an Image in the render method, the | |
| * image blinks, and there is no image for a fraction of a second. This is | |
| * solved by mounting 2 images and changing their opacity. | |
| * | |
| */ | |
| import React from 'react' | |
| import { |
| 'use strict'; | |
| import React, { | |
| AppRegistry, | |
| Component, | |
| StyleSheet, | |
| Text, | |
| View, | |
| TouchableOpacity, | |
| LayoutAnimation, | |
| } from 'react-native'; |
| function mapValues(obj, fn) { | |
| return Object.keys(obj).reduce((result, key) => { | |
| result[key] = fn(obj[key], key); | |
| return result; | |
| }, {}); | |
| } | |
| function pick(obj, fn) { | |
| return Object.keys(obj).reduce((result, key) => { | |
| if (fn(obj[key])) { |
| # install openjdk | |
| sudo apt-get install openjdk-7-jdk | |
| # download android sdk | |
| wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz | |
| tar -xvf android-sdk_r24.2-linux.tgz | |
| cd android-sdk-linux/tools | |
| # install all sdk packages |
Hi Nicholas,
I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:
The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't
Alamofire is a great Swift library developed by the creator of AFNetworking @mattt. The purpose of this gist is to explain how to use the built-in power of Alamofire to serialize your JSON. In this example we will be serializing a simple blog API. First we will start with serializing a single JSON object and add complexity as we go along.
This is the first JSON object that we will be serializing.
| import { Component } from "React"; | |
| export var Enhance = ComposedComponent => class extends Component { | |
| constructor() { | |
| this.state = { data: null }; | |
| } | |
| componentDidMount() { | |
| this.setState({ data: 'Hello' }); | |
| } | |
| render() { |