- Paste the following scipt in your .bashrc file if they doesn't exist.
# ~/.bashrc
export ANDROID_HOME=$HOME/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/platform-tools| import 'dart:async'; | |
| import 'package:auth_flow/app/utils/auth_utils.dart'; | |
| import 'package:auth_flow/app/utils/network_utils.dart'; | |
| import 'package:flutter/material.dart'; | |
| import 'package:shared_preferences/shared_preferences.dart'; | |
| class HomePage extends StatefulWidget { | |
| static final String routeName = 'home'; | |
| @override |
| // file location: | |
| // node_modules/react-native/local-cli/server/util/debuggerWorker.js | |
| var messageHandlers = { | |
| 'executeApplicationScript': function(message, sendReply) { | |
| for (var key in message.inject) { | |
| self[key] = JSON.parse(message.inject[key]); | |
| } | |
| importScripts(message.url); | |
| sendReply(); | |
| } |
# ~/.bashrc
export ANDROID_HOME=$HOME/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/platform-toolsCommit message convention We prefix our commit messages with one of the following to signify the kind of change:
fix: bug fixes, e.g. fix Button color on DarkTheme.
feat: new features, e.g. add Snackbar component.
refactor: code/structure refactor, e.g. new structure folder for components.
docs: changes into documentation, e.g. add usage example for Button.
| import 'package:flutter/material.dart'; | |
| class NoteForm extends StatefulWidget { | |
| static String routeName = 'noteForm'; | |
| @override | |
| State<StatefulWidget> createState() { | |
| return new _NoteFormState(); | |
| } | |
| } |
| document.getElementsByTagName('button')[0].onclick = function () { | |
| scrollTo(document.body, 0, 1250); | |
| } | |
| function scrollTo(element, to, duration) { | |
| var start = element.scrollTop, | |
| change = to - start, | |
| currentTime = 0, | |
| increment = 20; | |
FridayHug.com http://fridayhug.com
The Smallest Rails App http://thesmallestrailsapp.com
%w(action_controller/railtie coderay).each &method(:require)| const foo = {name: 'Foo', age: 16, nervous: false}; | |
| const bar = {name: 'Bar', age: 18, nervous: false}; | |
| const baz = {name: 'Baz', age: 20, nervous: true}; | |
| // Bad code | |
| // Debugging with console.log | |
| console.log(foo); | |
| console.log(bar); | |
| console.log(baz); |
| { | |
| "extends": ["airbnb-base", "prettier"], | |
| "plugins": ["prettier"], | |
| "parser": "babel-eslint", | |
| "parserOptions": { | |
| "ecmaVersion": 8, | |
| "ecmaFeatures": { | |
| "experimentalObjectRestSpread": true, | |
| "impliedStrict": true | |
| } |
| /** | |
| * add console.js at ther root of your app | |
| * Modify to make it more helpful for your project | |
| * > Note: `esm` adds ES6 support in Node | |
| * In package.json | |
| * ... | |
| * "scripts": { | |
| * "start": "nodemon -r esm ./server.js" | |
| * "console": "node -r esm --experimental-repl-await console", | |
| * } |