Skip to content

Instantly share code, notes, and snippets.

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

Yogie Putra yogieputra8

🏠
Working from home
  • Tokopedia
  • Jakarta, Indonesia
View GitHub Profile
@yogieputra8
yogieputra8 / main.js
Created August 23, 2016 18:01
To-Do Master with React-Native
import React, { Component} from 'react';
import {
StyleSheet,
Text,
View,
TextInput,
TouchableOpacity,
ScrollView,
AsyncStorage,
} from 'react-native';
import React, { Component } from 'react';
import {
Text,
View,
StyleSheet,
} from 'react-native';
const API_KEY = 'Your-personal-OAuth-token';
const ROOT_URL = 'https://www.eventbriteapi.com/v3/events/search/';
'use strict';
import React, { Component } from 'react';
import {
AppRegistry,
TabBarIOS,
StyleSheet,
Text,
View
} from 'react-native';
import React, { Component } from 'react';
import {
View,
Text,
TextInput,
TouchableOpacity,
StyleSheet
} from 'react-native';
import styles from '../../styles';
import { StyleSheet } from 'react-native';
module.exports = StyleSheet.create({
container:{
flex: 1,
justifyContent: 'center',
alignItems: 'center',
padding: 40
},
input:{
var db = firebase.database();
var ref = db.ref("students");
ref.orderByChild("city").equalTo("san_fransisco").on("value", function(snapshot) {
ref.orderByChild("age").equalTo(17).on("value", function(snapshot) {
console.log(snapshot.val());
});
});
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import "AppDelegate.h"
@yogieputra8
yogieputra8 / Privacy Policy
Created July 23, 2017 10:06
Privacy policy for Brainer App
As for now, we don't need any of your data at all
We just want you to try and play my game
@yogieputra8
yogieputra8 / localStorage.js
Created September 22, 2017 10:14
LocalStorage
componentDidMount(){
this.getToken() // Panggil function getToken
}
// Bikin function getToken
function getToken(){
const token = localStorage.getItem('item')
console.log(token)
}
import React, { Component } from 'react'
import { View, Text, FlatList, Image } from 'react-native'
import axios from 'axios'
class Products extends Component {
state = {
data_products: [],
refreshing: false