Skip to content

Instantly share code, notes, and snippets.

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

Andre Feri Saputra andreferi3

🏠
Working from home
  • Indonesia
View GitHub Profile
* {
margin: 0;
padding: 0;
box-sizing: inherit;
}
html {
font-size: 62.5%;
@include respond(tab-land) { // width < 1200px
import EStyleSheet from "react-native-extended-stylesheet";
import { fonts } from '../../assets/themes';
import { getStatusBarHeight } from '../helpers/GetStatusBarHeight';
export const GlobalStyles = EStyleSheet.create({
// * Typhography Font Gilroy
gilroyLight8: {
fontFamily: fonts.gilroyLight,
fontSize: '7.5rem'
},
import React from 'react'
import { View, StatusBar, ViewPropTypes, TouchableWithoutFeedback, Keyboard } from 'react-native'
import PropTypes from 'prop-types';
// * Components & Styling
import { Container, Content } from 'native-base';
import { GlobalStyles } from '../../public/styles/GlobalStyles';
import { onBoardData } from '../../public/constants/GlobalConstant';
import CActionBar from '../CActionBar';
import {NavigationActions, StackActions} from 'react-navigation';
let _navigator;
function setTopLevelNavigator(navigatorRef) {
_navigator = navigatorRef;
}
function navigate(routeName, params) {
_navigator.dispatch(
import { Dimensions, Platform, StatusBar } from 'react-native';
const X_WIDTH = 375;
const X_HEIGHT = 812;
const XSMAX_WIDTH = 414;
const XSMAX_HEIGHT = 896;
const { height: W_HEIGHT, width: W_WIDTH } = Dimensions.get('window');
@andreferi3
andreferi3 / upload.js
Created July 30, 2020 04:00 — forked from virolea/upload.js
Tracking file upload progress using axios
upload(files) {
const config = {
onUploadProgress: function(progressEvent) {
var percentCompleted = Math.round((progressEvent.loaded * 100) / progressEvent.total)
console.log(percentCompleted)
}
}
let data = new FormData()
data.append('file', files[0])
import React from 'react'
import { View, Text, TouchableOpacity } from 'react-native'
import PropTypes from 'prop-types';
const Timer = () => {
const [durations, setDurations] = useState({
minutes: '00',
seconds: '00',
});
fastlane_version "2.154.0"
before_all do |lane, options|
ensure_git_branch(branch: 'YOUR_BRANCH')
ensure_git_status_clean
git_pull
end
platform :android do
desc "Get list of version on build gradle"
function parseNumFormat(amount) {
if(amount) {
return amount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.');
} else {
return 0
}
}
@andreferi3
andreferi3 / styles.ts
Last active October 26, 2020 08:04
This is to showing auto suggestion CSS Intelisense for react-native-extended-stylesheet. place in your styles/index.ts
import { ImageStyle, TextStyle, ViewStyle } from "react-native"
import EStyleSheet from "react-native-extended-stylesheet"
type Function<K> = () => K
type Value<T> = T | string & {}
type Variable<T> = Value<T> | Function<Value<T>>
type Extended<T> = { [K in keyof T]: Variable<T[K]> }
type AnyStyle = ImageStyle & TextStyle & ViewStyle
type AnyStyleSet = { [key: string]: AnyStyle }