Skip to content

Instantly share code, notes, and snippets.

View DeVoresyah's full-sized avatar
:octocat:
Available for Remote

DeVoresyah ArEst DeVoresyah

:octocat:
Available for Remote
View GitHub Profile
@DeVoresyah
DeVoresyah / apisauce.js
Created June 20, 2020 08:03
Standard ApiSauce
import apisauce from 'apisauce'
const headers = {
'Content-Type': 'application/json',
'Authorization': 'Token 31beacea1ac15388c00c3eff86c3231b/LQ0W9fSPOrbdeYZSrlFSChSRmYLNhGUY//GvEXfRZmDH6PzDdW8D1rlOMIJj2zX',
}
// our "constructor"
const create = (baseURL = 'http://localhost:3333/api/client/v1') => {
const api = apisauce.create({
@DeVoresyah
DeVoresyah / api.js
Created June 20, 2020 07:40
Standar API Response
const HttpStatus = require('http-status-codes')
module.exports = function api(data, code) {
const { req, res } = this
const response = {
response: {
status: code,
message: HttpStatus.getStatusText(code),
url: `${req.protocol}://${req.hostname}${req.originalUrl}`
@DeVoresyah
DeVoresyah / App.js
Created March 24, 2020 22:03
[Draft Example] React Native Style Framework
import React, { Component } from 'react';
import {
View,
Text,
StatusBar,
TouchableOpacity
} from 'react-native';
import styles from './styles'
import colors from './styles/data/colors'
<template>
<div>
<div v-for="(item, index) in data" :key="index" @click="onCheck(index)" :class="{active: item.checked}">
</div>
</div>
</template>
<script>
export default {
data() {
@DeVoresyah
DeVoresyah / temporary-fix.md
Created February 17, 2020 17:40
Temporary Fix Ignite error _reactNavigation.ThemeColor.light

Generate with Ignite

First generate app with Ignite CLI

Update package.json

"react-native": "0.59.9",
"react-native-gesture-handler": "^1.4.1",
"react-native-reanimated": "^1.2.0",
"react-navigation": "^4.0.5",
"react-navigation-drawer": "^2.2.1",
@DeVoresyah
DeVoresyah / rn-setup.md
Created February 3, 2020 15:46
Setup React Native ENV
@DeVoresyah
DeVoresyah / README.md
Last active January 15, 2020 08:25
Setup GPG Signed Key (Mac & Linux)
@DeVoresyah
DeVoresyah / README.md
Created January 15, 2020 08:24
Setup GPG Signed Key (Mac & Linux)
@DeVoresyah
DeVoresyah / README.md
Created December 2, 2019 08:14
Connect PhpMyAdmin to MySQL Laradock

Step by Step

  • Run docker-compose exec mysql bash to open mysql bash
  • Login with mysql -uroot -proot
  • Run these commands :
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'root';
ALTER USER 'default'@'%' IDENTIFIED WITH mysql_native_password BY 'secret';
  • Open localhost:8080
@DeVoresyah
DeVoresyah / README.md
Created December 1, 2019 05:12
Setup PHP and Composer Solus OS

Step by Step

  • Install XAMPP for Linux
  • Run this command as a root
ln -s /opt/lampp/bin/php /usr/bin/php