From currying to closures there are quite a number of special words used in JavaScript. These will not only help you increase your vocabulary but also better understand JavaScript. Special terms are normally found in documentation and technical articles. But some of them like closures are pretty standard things to know about. Knowing what the word itself means can help you know the concept it's named for better.
- Homebrew should be installed (Command line tools for Xcode are included).
- Install
nvm
via Homebrew
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- import here your svg logo (in drawables) | |
See https://stackoverflow.com/questions/30923205/easiest-way-to-use-svg-in-android/39266840#39266840 | |
--> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# gcloud auth activate-service-account --key-file=85.json | |
# gcloud projects list | |
project="my-projet" | |
space="" | |
echo "gcloud auth list" | |
gcloud auth list | |
echo -e "$space" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// import the library | |
import PropTypes from 'prop-types'; | |
// define a component | |
class Greeting extends React.Component { | |
render() { | |
return ( | |
<h1>Hello, {this.props.name}</h1> | |
); | |
} |
- Follow the steps given here to install Node.js and NPM.
- Verify whether NPM is installed by typing
npm -v
in a terminal window.
npm install -g react-native-cli
- Download and install Android Studio as explained here.
- Run Android Studio and open the SDK Manager. Under the SDK Platforms tab, check Show Package Details, expand Android 6.0 (Marshmallow) and check the following:
Note:
When this guide is more complete, the plan is to move it into Prepack documentation.
For now I put it out as a gist to gather initial feedback.
If you're building JavaScript apps, you might already be familiar with some tools that compile JavaScript code to equivalent JavaScript code:
- Babel lets you use newer JavaScript language features, and outputs equivalent code that targets older JavaScript engines.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# don't forget chmod +x .git/hooks/pre-commit | |
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep ".jsx\{0,1\}$") | |
ESLINT="$(git rev-parse --show-toplevel)/node_modules/.bin/eslint" | |
if [[ "$STAGED_FILES" = "" ]]; then | |
exit 0 | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"short_name": "My App // Should be <= 12 characters. Appears on the home screen once installed ", | |
"name": "My App // Must be <= 45 characters. Appears in places with more space (install dialogs, etc.)", | |
"icons": [{ | |
"src": "images/splashIcon.png // Android: Requires a PNG at least 512x512 for your startup screen. This is used along with your app name (above) and background color (below) to generate a splash screen. Learn more: https://developers.google.com/web/fundamentals/web-app-manifest/#add_a_splash_screen", | |
"sizes": "512x512", | |
"type": "image/png" | |
}, { | |
"src": "images/appIcon.png // Android requires a PNG at least 192x192 for your home screen icon", | |
"sizes": "192x192", |