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 { ComponentType } from 'react'; | |
| /** | |
| * function that performs no operations | |
| */ | |
| const noop = Object.freeze(() => { | |
| /**/ | |
| }); | |
| const arrayToMap = (list: any) => list.reduce( |
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 logger from 'winston'; | |
| function gracefulHadleExit(onExit) { | |
| let shutdownInProgress = false; | |
| async function exit(exitCode = 0, err = null) { | |
| if (shutdownInProgress) return; |
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
| automatic update by http://atom.io/packages/sync-settings |
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
| pandoc -w markdown_github in.wiki -o out.md |
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
| function promisify(func) { | |
| return (...args) => new Promise((resolve, reject) => { | |
| func(...args, (err, ...results) => { | |
| if (err) return reject(err); | |
| resolve(results.length === 1 ? results[0] : results); | |
| }); |
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
| cd /d %~dp0 | |
| set PROJECT_NAME = NewProject | |
| mkdir %PROJECT_NAME% && cd %PROJECT_NAME% | |
| yarn init --yes | |
| yarn add react-native-cli --dev | |
| cd .. && "./%PROJECT_NAME%/node_modules/.bin/react-native" init %PROJECT_NAME% |
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
| cd /d %~dp0 | |
| start cmd /k emulator @Nexus_5X_API_26 | |
| start cmd /k ".\node_modules\.bin\react-native" start | |
| timeout /15 | |
| start cmd /k ".\node_modules\.bin\react-native" run-android |
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 android.annotation.TargetApi; | |
| import android.content.Context; | |
| import android.os.Parcel; | |
| import android.os.Parcelable; | |
| import android.util.AttributeSet; | |
| import android.view.View; | |
| public class CustomView extends View { |
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
Show hidden characters
| { | |
| "cmd": ["node", "$file"], | |
| "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)", | |
| "selector": "source.js", | |
| "shell":true, | |
| "encoding": "cp1252", | |
| "windows": | |
| { | |
| "cmd": ["taskkill", "/F", "/IM", "node.exe", "&", "C:/nodejs/node.exe", "$file"], | |
| "shell": true |