Skip to content

Instantly share code, notes, and snippets.

View efstathiosntonas's full-sized avatar

Stathis Ntonas efstathiosntonas

View GitHub Profile
@efstathiosntonas
efstathiosntonas / gist:ce4d8cea1936a65c99ef49bf75717c08
Created October 6, 2020 03:52
System and custom message react native gifted chat
import {
GiftedChat,
SystemMessage,
// ...all other imports
} from "react-native-gifted-chat
<GiftedChat
// ...all other stuff
@efstathiosntonas
efstathiosntonas / ReactNativeOneSignalNotificationsHandlerAsyncStorage.js
Last active September 19, 2019 10:09
OneSignal React Native Notifications Handler and AsyncStorage
import AsyncStorage from '@react-native-community/async-storage';
import {Navigation} from 'react-native-navigation';
import {uniqBy} from 'lodash';
// using uuid/v4 to generate unique keys for each notification for FlatList etc.
import uuidv4 from 'uuid/v4';
// AsyncStorage.clear();
export const handleNotifications = async (notification, condition, ref) => {
console.log('COMING FROM ', ref);
@efstathiosntonas
efstathiosntonas / greek_capital_cities_coordinates.json
Created September 4, 2019 14:05
Greek Capital Cities Coordinates JSON
[
{"name": "Αττικής", "location": [38.08333 ,23.5]},
{"name": "'Αγιος Νικόλαος Αθηνών'", "location": [38.005852, 23.729193]},
{"name": "Άγιος Ελευθέριος", "location": [38.021036, 23.729219]},
{"name": "Αθήνα κέντρο", "location": [37.980812, 23.724287]},
{"name": "Αμπελόκηποι", "location": [37.988734, 23.763039]},
{"name": "Αττική Αθηνών", "location": [37.997651, 23.721319]},
{"name": "Γκάζι", "location": [37.978538, 23.712526]},
{"name": "Γουδί", "location": [37.985828, 23.767172]},
{"name": "Ελαιώνας", "location": [38.007859, 23.667688]},
@efstathiosntonas
efstathiosntonas / index.js
Created January 11, 2018 14:02
Facebook Ads every X posts in React Native Flatlist
import React, {Component} from 'react';
import {ActivityIndicator, AsyncStorage, Dimensions, FlatList, LayoutAnimation, StyleSheet, Text, TouchableHighlight, TouchableOpacity, View, Alert, Platform} from 'react-native';
import Icon from 'react-native-vector-icons/Ionicons';
import {Card, CardImage, CardTitle} from 'react-native-material-cards';
import ActionButton from 'react-native-circular-action-menu';
import ImagePicker from 'react-native-image-crop-picker';
import {MaterialIndicator} from 'react-native-indicators';
import Storage from 'react-native-storage';
import {EventRegister} from 'react-native-event-listeners';
import shortid from 'shortid';