Let's say you want to host domains first.com
and second.com
.
Create folders for their files:
var Vector = function(x, y) { | |
this.x = x || 0; | |
this.y = y || 0; | |
}; | |
// return the angle of the vector in radians | |
Vector.prototype.getDirection = function() { | |
return Math.atan2(this.y, this.x); | |
}; |
Number.prototype.map = function (in_min, in_max, out_min, out_max) { | |
return (this - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; | |
} |
RN < 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache | |
RN >= 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache | |
RN >= 0.63 - watchman watch-del-all && rm -rf node_modules && npm install && rm -rf /tmp/metro-* && npm run start --reset-cache | |
npm >= 5 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache | |
Windows - del %appdata%\Temp\react-native-* & cd android & gradlew clean & cd .. & del node_modules/ & npm cache clean --force & npm install & npm start -- --reset-cache |
import React, { View, Text, Linking } from 'react-native'; | |
import urlParse from 'url-parse'; | |
class App extends Component { | |
componentDidMount() { | |
// Handling Deep Linking | |
const deepLinkUrl = Linking.getInitialURL().then((url) => { | |
console.log(`Deep Link URL: ${url}`); | |
if (url) { | |
const parsedUrl = urlParse(url, true); |
// http://stackoverflow.com/a/13351534 | |
var vFOV = this.camera.fov * Math.PI / 180;; | |
var h = 2 * Math.tan( vFOV / 2 ) * this.camera.position.z; | |
var aspect = width / height; | |
var w = h * aspect; |
// Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/ | |
// See also: http://www.paulund.co.uk/change-url-of-git-repository | |
$ cd $HOME/Code/repo-directory | |
$ git remote rename origin bitbucket | |
$ git remote add origin https://github.com/mandiwise/awesome-new-repo.git | |
$ git push origin master | |
$ git remote rm bitbucket |
Afghanistan | |
Albania | |
Algeria | |
Andorra | |
Angola | |
Antigua & Deps | |
Argentina | |
Armenia | |
Australia | |
Austria |