Create an empty Git repository
git init [my_project]
Clone an external Git repository
git clone link.to.repository.git
// For more documentations refer to https://github.github.io/fetch/ | |
import 'whatwg-fetch'; | |
/** | |
* Parses the JSON returned by a network request | |
* | |
* @param {object} response A response from a network request | |
* | |
* @return {object} The parsed JSON from the request | |
*/ |
# http://editorconfig.org | |
# A special property that should be specified at the top of the file outside of | |
# any sections. Set to true to stop .editor config file search on current file | |
root = true | |
[*] | |
# Indentation style | |
# Possible values - tab, space | |
indent_style = space |
//by default | |
//react-native run-ios | |
//iPhone 4 | |
react-native run-ios --simulator "iPhone ${1:-4}" | |
//iPhone 4s | |
react-native run-ios --simulator "iPhone ${1:-4s}" | |
//iPhone 5 |
export const patterns = [{ | |
name:"Date in format dd/mm/yyyy", | |
regex:/^(0?[1-9]|[12][0-9]|3[01])([ /\-])(0?[1-9]|1[012])\2([0-9][0-9][0-9][0-9])(([ -])([0-1]?[0-9]|2[0-3]):[0-5]?[0-9]:[0-5]?[0-9])?$/, | |
description:"Will match dates with dashes, slashes or with spaces (e.g. dd-mm-yyyy dd/mm/yyyy dd mm yyyy), and optional time separated by a space or a dash (e.g. dd-mm-yyyy-hh:mm:ss or dd/mm/yyyy hh:mm:ss).", | |
tags:"date,time" | |
}, | |
{ | |
name:"Time in 24-hour format", | |
regex:/^([01]?[0-9]|2[0-3]):[0-5][0-9]$/, | |
description: "Match times in 24 hour format", |
import { Injectable } from '@angular/core'; | |
import { Store } from '../store'; | |
@Injectable() | |
export class StoreHelper { | |
constructor(private store: Store) {} | |
update(prop, state) { | |
const currentState = this.store.getState(); | |
this.store.setState(Object.assign({}, currentState, { [prop]: state })); | |
} | |
add(prop, state) { |
platforms/ | |
plugins/ |
[ | |
{ | |
"name": "Afghanistan", | |
"dial_code": "+93", | |
"code": "AF" | |
}, | |
{ | |
"name": "Aland Islands", | |
"dial_code": "+358", | |
"code": "AX" |
Ubuntu
google-chrome --args --disable-web-security --allow-running-insecure-content
OSX
open -a Google\ Chrome --args --disable-web-security --allow-running-insecure-content
export default function promiseWhen(condition, timeout = 2000) { | |
return new Promise((resolve, reject) => { | |
setTimeout(() => { | |
reject(); | |
}, timeout); | |
const loop = () => { | |
if (condition()) { | |
return resolve(); | |
} |