Skip to content

Instantly share code, notes, and snippets.

Dwi Wijonarko dwijonarko

Block or report user

Report or block dwijonarko

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dwijonarko
dwijonarko / HomeScreen.js
Created May 8, 2019
Upload image to firebase
View HomeScreen.js
import React from "react";
import { KeyboardAvoidingView, View, Button, Text, TextInput, Alert, Image,TouchableOpacity } from 'react-native'
import firebase from "firebase";
import Spinner from "./Spinner";
import { ImagePicker,Permissions } from "expo";
import uuid from 'uuid';
export default class HomeScreen extends React.Component {
constructor(props) {
super(props)
this.state = {
@dwijonarko
dwijonarko / Article.php
Last active May 10, 2019
CRUD Laravel - Articles
View Article.php
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Article extends Model
{
protected $fillable = ['title','content','category_id','user_id'];
}
View tk.json
[
{"id":82,"name":"TK Muslimat NU 15","address":"Jalan Brigjen Slamet Riadi 6 Nomor 714, Oro-oro Dowo, Klojen","category_id":2,"level_id":4,"latitude":"-7.970744","longitude":"112.628372","created_at":"2019-01-14 07:50:59","updated_at":"2019-01-14 07:50:59","deleted_at":null},
{"id":83,"name":"TK Muslimat NU 38","address":"Jl. Pahlawan Trip No.5, Oro-oro Dowo, Klojen","category_id":2,"level_id":4,"latitude":"-7.968318","longitude":"112.623151","created_at":"2019-01-14 07:51:50","updated_at":"2019-01-14 07:51:50","deleted_at":null},
{"id":84,"name":"TK Muslimat NU 17 Nur Rokhmat","address":"Jl. Gading No.54, Gading Kasri, Klojen","category_id":2,"level_id":4,"latitude":"-7.970347","longitude":"112.614682","created_at":"2019-01-14 07:52:51","updated_at":"2019-01-14 07:52:51","deleted_at":null},
{"id":85,"name":"TK. Kartika IV-79","address":"Jl. Kesatrian No.74, Kesatrian, Blimbing","category_id":2,"level_id":4,"latitude":"-7.975457","longitude":"112.644429","created_at":"2019-01-14 08:25:06","updated_at":"2019-
@dwijonarko
dwijonarko / CategoriesController.php
Last active Apr 16, 2019
CRUD Laravel - table categories
View CategoriesController.php
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Category;
class CategoryController extends Controller
{
@dwijonarko
dwijonarko / App.js
Last active Apr 15, 2019
Firebase Auth with react-native
View App.js
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import firebase from "firebase";
import AuthLoadingScreen from "./components/AuthLoadingScreen";
import SignInScreen from "./components/LoginPage";
import HomeScreen from "./components/HomeScreen";
import OtherScreen from "./components/OtherScreen";
import { createSwitchNavigator, createStackNavigator, createAppContainer } from 'react-navigation';
// Implementation of HomeScreen, OtherScreen, SignInScreen, AuthLoadingScreen
View MapScreen.js
import React, { Component } from 'react';
import { Text, View, StyleSheet,Dimensions } from 'react-native';
import { Constants, MapView, Location, Permissions } from 'expo';
const window = Dimensions.get('window');
const { width, height } = window;
export default class MapScreen extends Component {
constructor(props) {
super(props)
View CameraScreen.js
import React, { Component } from 'react';
import {Alert, ImageBackground, SafeAreaView, Text, TouchableOpacity, View } from 'react-native';
import { Camera, Permissions, FileSystem } from 'expo';
import Ionicons from '@expo/vector-icons/Ionicons';
export default class CameraScreen extends Component {
constructor() {
super();
this.state = {
hasCameraPermission: null,
View MenuDrawer.js
import React, { Component } from 'react';
import { Dimensions,Platform } from 'react-native';
import { createAppContainer, createDrawerNavigator, createBottomTabNavigator,createStackNavigator } from "react-navigation";
import Ionicons from '@expo/vector-icons/Ionicons';
import HomeScreen from '../screens/HomeScreen';
import ProfileScreen from '../screens/ProfileScreen';
import SettingScreen from '../screens/SettingScreen';
import MenuDrawer from '../components/MenuDrawer';
@dwijonarko
dwijonarko / App.js
Created Mar 8, 2019
React Native SQLite implementation
View App.js
import React from 'react';
import { StyleSheet, Text, View, TextInput, TouchableOpacity } from 'react-native';
import { Constants, SQLite } from 'expo';
const db = SQLite.openDatabase('db.db');
class Items extends React.Component {
state = {
items: null
};
@dwijonarko
dwijonarko / App.js
Last active Feb 28, 2019
React Navigation
View App.js
import React from 'react';
import HomePage from "./src/HomePage";
import ProfilePage from "./src/ProfilePage";
import {createStackNavigator,createAppContainer} from 'react-navigation'
const Navigasi =createStackNavigator(
{
Home:HomePage,
Profile:ProfilePage
You can’t perform that action at this time.