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
render() { | |
onSubmit=()=>{} | |
return ( | |
<View style={{flex:1, flexDirection:'row', backgroundColor:'black'}}> | |
<Button | |
title={"Submit"} | |
onPress={this.onSubmit}/> | |
</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
export default class example extends React.Component { | |
state = { | |
name : '' | |
} | |
setName=(name)=>{ | |
this.setState({ 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
const mongoose = require('mongoose'); | |
const toCamel = (string) => string.replace(/([-_][a-z])/gi, ($1) => $1 | |
.toUpperCase() | |
.replace('-', '') | |
.replace('_', '')); | |
const isObject = (args) => args === Object(args) && !Array.isArray(args) && typeof args !== 'function'; | |
const keysToCamel = (args) => { |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Mail</title> | |
<style type="text/css"> | |
#outlook a { | |
padding: 0; |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Mail</title> | |
<style type="text/css"> | |
#outlook a { | |
padding: 0; |
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 _ from 'lodash'; | |
const keysTo = (keys) => { | |
if (Array.isArray(keys)) { | |
return keys.map((key) => snakeCaseCreator(key)); | |
} if (_.isPlainObject(keys)) { | |
return Object.keys(keys).reduce( | |
(result, key) => ({ | |
...result, | |
[_.snakeCase(key)]: snakeCaseCreator(obj[key]), |
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
recordiOSSimulator() { | |
echo -n "Started iOS simulator recording"; | |
echo -n "Use CTRL+C to stop recording"; | |
xcrun simctl io booted recordVideo "$1"; | |
} |
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
if [ -f ~/.bash_profile ] | |
then | |
echo bash profile exists | |
else | |
echo bash profile does not exists | |
fi |
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 moment from 'moment'; | |
import cloneDeep from 'lodash/cloneDeep'; | |
import querystring from 'querystring'; | |
const calendarDateFormat = 'YYYY-MM-DD HH:mm:ss'; | |
const displayDateFormat = 'DD-MM-YYYY hh:mm A'; | |
const createEvents = (event, query) => { | |
let events = []; |
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
export const apps = { | |
"whatsapp": {pkgName: "com.whatsapp", urlScheme: "whatsapp", urlParams: "app"}, // fa | |
"facebook": {pkgName: "com.facebook.katana", urlScheme: "fb", urlParams: "requests"}, // fa: facebook-official | |
"facebook messenger": {pkgName: "com.facebook.orca", urlScheme: "fb-messenger", urlParams: "user-thread/{user-id}"}, // fa: facebook | |
"skype": {pkgName: "com.skype.raider", urlScheme: "skype", urlParams: "echo123?call"}, // fa | |
"wechat": {pkgName: "com.tencent.mm", urlScheme: "weixin", urlParams: "dl/chat"}, // fa | |
"snapchat": {pkgName: "com.snapchat.android", urlScheme: "snapchat", urlParams: "?u=foo"}, // fa | |
"twitter": {pkgName: "com.twitter.android", urlScheme: "twitter", urlParams: "messages"}, // fa | |
"youtube": {pkgName: "com.google.android.youtube", urlScheme: "youtube", urlParams: "watch?v=dQw4w9WgXcQ"}, // fa | |
"netflix": {pkgName: "com.netflix.mediaclient", urlScheme: "nflx", urlParams: ""}, |
OlderNewer