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
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"
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',
});
@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 { 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');
import {NavigationActions, StackActions} from 'react-navigation';
let _navigator;
function setTopLevelNavigator(navigatorRef) {
_navigator = navigatorRef;
}
function navigate(routeName, params) {
_navigator.dispatch(
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 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'
},
* {
margin: 0;
padding: 0;
box-sizing: inherit;
}
html {
font-size: 62.5%;
@include respond(tab-land) { // width < 1200px
@andreferi3
andreferi3 / encrypt_openssl.md
Created June 27, 2020 07:49 — forked from dreikanter/encrypt_openssl.md
File encryption using OpenSSL

Symmetic encryption

For symmetic encryption, you can use the following:

To encrypt:

openssl aes-256-cbc -salt -a -e -in plaintext.txt -out encrypted.txt

To decrypt:

import React from 'react'
import { View, ViewPropTypes } from 'react-native'
import PropTypes from 'prop-types';
import { data1 } from '../example/Chart/dataScheme';
import { SVGHeight, SVGWidth, GRAPH_MARGIN, graphWidth, graphHeight, parseTime, xRange, yRange, countGraphHeight, countGraphWidth } from './helper/chartHelper';
import { utcParse, extent, min, max } from 'd3';
import * as shape from 'd3-shape';
import { scaleTime, scaleLinear } from 'd3-scale'
import Svg, { Defs, LinearGradient, Stop, Path, G, Line, Text } from 'react-native-svg';