I hereby claim:
- I am phuochau on github.
- I am hauvo (https://keybase.io/hauvo) on keybase.
- I have a public key ASAYd5F03S5a1iTya8Mbp8y9ptLtOO2hedxc3wjC2dzSfAo
To claim this, I am signing this object:
import { | |
findNodeHandle | |
} from 'react-native' | |
this.childItem.measureLayout(findNodeHandle(this.containerWrapper), (x, y, width, height) => { | |
console.log('got measurement', x, y, width, height) | |
}) |
I hereby claim:
To claim this, I am signing this object:
export const hasLinks = (str) => { | |
return str.test(/(?:(?:https?|ftp):\/\/|\b(?:[a-z\d]+\.))(?:(?:[^\s()<>]+|\((?:[^\s()<>]+|(?:\([^\s()<>]+\)))?\))+(?:\((?:[^\s()<>]+|(?:\(?:[^\s()<>]+\)))?\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))?/gi) | |
} | |
export const groupLinkIntoAngleBracket = (str, replacedString) => { | |
return str.replace(/(?:(?:https?|ftp):\/\/|\b(?:[a-z\d]+\.))(?:(?:[^\s()<>]+|\((?:[^\s()<>]+|(?:\([^\s()<>]+\)))?\))+(?:\((?:[^\s()<>]+|(?:\(?:[^\s()<>]+\)))?\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))?/gi, replacedString) | |
} |
+ (NSMutableDictionary *)deepMutableCopyOfDictionary:(NSDictionary *)dictionary | |
{ | |
return (__bridge_transfer NSMutableDictionary *)CFPropertyListCreateDeepCopy(kCFAllocatorDefault, (__bridge CFDictionaryRef)dictionary, kCFPropertyListMutableContainers); | |
} | |
+ (NSMutableArray *)deepMutableCopyOfArray:(NSArray *)array | |
{ | |
return (__bridge_transfer NSMutableArray *)CFPropertyListCreateDeepCopy(kCFAllocatorDefault, (__bridge CFArrayRef)array, kCFPropertyListMutableContainers); | |
} |
APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}" | |
# This script loops through the frameworks embedded in the application and | |
# removes unused architectures. | |
find "$APP_PATH" -name '*.framework' -type d | while read -r FRAMEWORK | |
do | |
FRAMEWORK_EXECUTABLE_NAME=$(defaults read "$FRAMEWORK/Info.plist" CFBundleExecutable) | |
FRAMEWORK_EXECUTABLE_PATH="$FRAMEWORK/$FRAMEWORK_EXECUTABLE_NAME" | |
echo "Executable is $FRAMEWORK_EXECUTABLE_PATH" |
Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.
In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.
Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j
const { user, profiles } = this.state | |
const swipedProfiles = await this.getSwiped(uid) | |
const geoFireRef = new GeoFire(firebase.database().ref('geoData')) | |
const userLocation = [user.geolocation.latitude, user.geolocation.longitude] | |
const geoQuery = geoFireRef.query({ | |
center: userLocation, | |
radius: distance | |
}) | |
geoQuery.on('key_entered', async (uid, location, distance) => { | |
log(uid + ' at ' + location + ' is ' + distance + 'km from the center') |
import React, { Component } from 'react' | |
import { | |
View, | |
InteractionManager | |
} from 'react-native' | |
export default class Screen extends Component { | |
constructor (props) { | |
super(props) | |
this.state = { |
1. Architecture: