Skip to content

Instantly share code, notes, and snippets.

View kafkadev's full-sized avatar
🏠
Working from home

Gokhan Celik kafkadev

🏠
Working from home
View GitHub Profile
@kafkadev
kafkadev / app.js
Created July 18, 2017 21:24 — forked from felipecsl/app.js
Sample use of react-native-maps with a tabbed layout
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
TouchableOpacity,
Text,
ViewPagerAndroid,
View,
} from 'react-native';
import MapView from 'react-native-maps';
@kafkadev
kafkadev / MapScreen.js
Created July 18, 2017 21:24 — forked from amitpdev/MapScreen.js
React Native Map Region Persistency - Save and Restore the last region on the map set by your user
import React from 'react'
import { View, StyleSheet, AsyncStorage } from 'react-native'
import MapView from 'react-native-maps'
const DEFAULT_REGION = {
latitude: 32.068185,
longitude: 34.778051,
latitudeDelta: 0.045,
longitudeDelta: 0.045,
}
@kafkadev
kafkadev / react-native-maps-enable-google-maps-instructions.md
Created July 18, 2017 21:21 — forked from heron2014/react-native-maps-enable-google-maps-instructions.md
Visual instructions how to enable Google Maps on IOS using react-native-maps

Visual instructions how to enable Google Maps on IOS using react-native-maps

This is for my personal use, things might not be correctly explained here. For the official docs please check https://github.com/airbnb/react-native-maps

Steps from scratch:

1.react-native init GoogleMapPlayground

2. cd GoogleMapPlayground

@kafkadev
kafkadev / UserMap.js
Created July 18, 2017 21:21 — forked from chapeljuice/UserMap.js
Maps are blurry at lower deltas, and some of the map props aren't working. Why?
import React from 'react'
import { Text, View } from 'react-native'
import { connect } from 'react-redux'
import MapView from 'react-native-maps';
import styles from './Styles/UserMapStyle'
class UserMap extends React.Component {
constructor (props) {
@kafkadev
kafkadev / AndroidManifest.xml
Created July 18, 2017 21:04
React native maps on Android
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.servicemap"
android:versionCode="1"
android:versionName="1.0">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-sdk
android:minSdkVersion="16"
// 1.In terminal run:
// create-react-native-app maps
// cd maps
// npm start
// 2. Scan QR code to load project in expo
// 3. npm install react-native-maps --save
// 4. react-native link react-native-maps
@kafkadev
kafkadev / index.android.js
Created July 12, 2017 08:20 — forked from TiagoGouvea/index.android.js
Sample DrawerLayout opened by clicking in a TouchableHighlight component
/**
* Sample React Native App
* https://github.com/facebook/react-native
*/
'use strict';
var React = require('react-native');
var {
AppRegistry,
StyleSheet,
'use strict';
import {Actions} from "react-native-router-flux";
// var Sinch = require('./Sinch-javascript/sinch-rtc')
import Camera from 'react-native-camera';
var GiftedMessenger = require('react-native-gifted-messenger');
var GiftedSpinner = require('react-native-gifted-spinner');
var React = require('react-native');
const timer = require('react-native-timer');
var {
AppRegistry,
@kafkadev
kafkadev / upload_snap.js
Created July 7, 2017 22:16 — forked from Tamal/upload_snap.js
React Native File upload using XMLHttpRequest
_uploadSnap() {
var url = 'http://example.com/upload'; // File upload web service path
var photo = {
uri: this.state.picturePath, // CameralRoll Url
type: 'image/jpeg',
name: 'photo.jpg',
};
var formData = new FormData();
formData.append("file", photo);
@kafkadev
kafkadev / is_serialized.php
Created June 19, 2017 15:28 — forked from cs278/is_serialized.php
PHP is_serialized() function.
<?php
/**
* This program is free software. It comes without any warranty, to
* the extent permitted by applicable law. You can redistribute it
* and/or modify it under the terms of the Do What The Fuck You Want
* To Public License, Version 2, as published by Sam Hocevar. See
* http://sam.zoy.org/wtfpl/COPYING for more details.
*/
/**