First things first !
sudo apt update
sudo apt upgradesudo apt-get install build-essential git| #!/bin/bash | |
| ##################################################### | |
| # Name: Bash CheatSheet for Mac OSX | |
| # | |
| # A little overlook of the Bash basics | |
| # | |
| # Usage: | |
| # | |
| # Author: J. Le Coupanec | |
| # Date: 2014/11/04 |
| //This gist is a fast reference to ES06 to whose already knows es05. | |
| //I'm trying to use a different approach: first the example and after the explanation. | |
| //Lesson 1: Template literals | |
| console.log(`hello ${firstname}, | |
| how are you?`); | |
| //Template literals are string literals with support for interpolation(using ${variable}) and multiple lines. |
This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.
###Array ####Definition:
| // sending to sender-client only | |
| socket.emit('message', "this is a test"); | |
| // sending to all clients, include sender | |
| io.emit('message', "this is a test"); | |
| // sending to all clients except sender | |
| socket.broadcast.emit('message', "this is a test"); | |
| // sending to all clients in 'game' room(channel) except sender |
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
| Disclaimer: The instructions are the collective efforts from a few places online. | |
| Nothing here is my original. But I want to put them together in one place to save people from spending the same time as I did. | |
| First off, bundle. | |
| ================== | |
| 1. cd to the project directory | |
| 2. Start the react-native packager if not started | |
| 3. Download the bundle to the asset folder: | |
| curl "http://localhost:8081/index.android.bundle?platform=android" -o "android/app/src/main/assets/index.android.bundle" |
| # run on other port | |
| react-native start --port 8085 | |
| npm start -- --port=8080 |
| var path = require('path'); | |
| module.exports = { | |
| getAssetExts() { | |
| return [ | |
| 'ts', | |
| 'tsx' | |
| ] | |
| }, | |
| getTransformModulePath() { | |
| return path.join(__dirname, 'transformer.js'); |
npm install react-native-cli -g
react-native init <ProjectName>
npm install --save enzyme react-dom enzyme-adapter-react-16