Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
i like food

Mahardicka m4har

💭
i like food
View GitHub Profile
@m4har
m4har / coverage
Last active Jul 22, 2021
coverage starter minimal nextjs
View coverage
{"schemaVersion":1,"label":"Test Coverage","message":"100","color":"green","namedLogo":"jest"}
@m4har
m4har / App.js
Created May 4, 2020
react native auth passportjs facebook google
View App.js
import React, {useEffect, useState} from 'react';
import {
View,
Button,
Linking,
Alert,
Platform,
Image,
Text,
} from 'react-native';
@m4har
m4har / index.js
Created May 3, 2020
express passportjs facebook google
View index.js
const express = require("express");
const bodyParser = require("body-parser");
const session = require("express-session");
const facebookStrategy = require("passport-facebook").Strategy;
const googleStrategy = require("passport-google-oauth20").Strategy;
const passport = require("passport");
const cors = require("cors");
const port = process.env.PORT || "3000";
//Initiate our app
View get.json
{
"status":"ok"
}
View keybase.md

Keybase proof

I hereby claim:

  • I am m4har on github.
  • I am m4har (https://keybase.io/m4har) on keybase.
  • I have a public key ASBpHN18TN-QB7ae8xvIQzEW8KFz0YlQWdWmapPUtmosqAo

To claim this, I am signing this object:

View test.json
{
"id":555,
"name":"Kucing Ganteng",
"role":"admin",
"profile":"https://www.rd.com/wp-content/uploads/2017/09/01-shutterstock_476340928-Irina-Bg-1024x683.jpg"
}
View Pin.js
import React, { PureComponent } from 'react'
import { Text, View, FlatList, TouchableOpacity } from 'react-native'
const Button = [
{ name: '1', icon: '' },
{ name: '2', icon: '' },
{ name: '3', icon: '' },
{ name: '4', icon: '' },
{ name: '5', icon: '' },
{ name: '6', icon: '' },
@m4har
m4har / LazyView.js
Last active Aug 6, 2019
kalo banyak component view di rn, pasti navigasinya agak lama
View LazyView.js
import React, { PureComponent } from 'react'
import { View, ViewPropTypes, Animated } from 'react-native'
import { withNavigationFocus } from 'react-navigation'
// import PropTypes from 'prop-types';
class LazyView extends PureComponent {
state = {
show: false,
refresh: false
};
View App.js
// App.js
import React from "react";
import Login from "./src/views/Login";
const LoginScreen = () => <Login />;
export default LoginScreen;
@m4har
m4har / index.js
Created May 15, 2019
views Login
View index.js
// src/views/Login/index.js
import React, { PureComponent } from "react";
import { View } from "react-native";
// component
import Gradient from "../../components/Gradient";
import FormInput from "../../components/FormInput";
import Button from "../../components/Button";
import Loading from "../../components/Loading";