Skip to content

Instantly share code, notes, and snippets.

View khalid32's full-sized avatar
🤩
enthusiastic

Khalid Syfullah Zaman khalid32

🤩
enthusiastic
View GitHub Profile
{
"expo": {
"name": "appName",
"icon": "./src/img/icon.png",
"version": "#.#.#",
"slug": "app-name",
"sdkVersion": "27.0.0",
"description": "more on app.",
"privacy": "unlisted",
"orientation": "portrait",
gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -sOutputFile=output.pdf input.pdf
// where "input.pdf" is the name of your PDF file..
@khalid32
khalid32 / How to build .apk or .ipa file (standalone app) via expo
Last active November 27, 2018 07:42
A short Note about how to build a standalone app both on ios(.ipa) and android(.apk). Full documentation is on https://tinyurl.com/apkipa
==== FOR ANDROID ====
1. Run `expo build:android`
this option appears on terminal,
--------------------------------------------------------------------------
| [exp] No currently active or previous builds for this project. |
| |
| Would you like to upload a keystore or have us generate one for you? |
| If you don't know what this means, let us handle it! :) |
import React, { Component } from 'react';
import { StyleSheet, View, Text, Animated, Easing, Dimensions } from 'react-native';
const {width, height} = Dimensions.get('window');
export default class Stagger extends Component{
componentWillMount(){
this.anime1 = new Animated.Value(0);
this.anime2 = new Animated.Value(0);
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
View,
Animated,
PanResponder
} from 'react-native';
const SQUARE_DIMENSIONS = 100;
@khalid32
khalid32 / Android Permissions
Created December 31, 2017 16:11
a list of permissions for android...
this.PERMISSIONS = {
READ_CALENDAR: 'android.permission.READ_CALENDAR',
WRITE_CALENDAR: 'android.permission.WRITE_CALENDAR',
CAMERA: 'android.permission.CAMERA',
READ_CONTACTS: 'android.permission.READ_CONTACTS',
WRITE_CONTACTS: 'android.permission.WRITE_CONTACTS',
GET_ACCOUNTS: 'android.permission.GET_ACCOUNTS',
ACCESS_FINE_LOCATION: 'android.permission.ACCESS_FINE_LOCATION',
ACCESS_COARSE_LOCATION: 'android.permission.ACCESS_COARSE_LOCATION',
RECORD_AUDIO: 'android.permission.RECORD_AUDIO',
@khalid32
khalid32 / Convert ISO Date format to dd-mm-yyyy
Created November 28, 2017 03:45
a demonstration to convert toISOString() to dd-mm-yyyy with JavaScript
new Date().toISOString().replace(/T.*/,'').split('-').reverse().join('-')
@khalid32
khalid32 / Insert Unique ID sorted way in array
Last active November 26, 2017 04:15
place random unique IDs in array. If it exists, then it won't store into array.
let arrayOfID = [], temp;
storeBillIDinArray = (ID) => {
if(arrayOfID.length === 0){
arrayOfID.push(ID);
console.log(`Initial Array of ID: ${arrayOfID}`);
}else{
for(let i = 0; i < arrayOfID.length; i++){
if(arrayOfID[i] === ID){
console.log(`already exist!!`);
@khalid32
khalid32 / Create horizontal page swiper using ScrollView(react-native)
Created October 31, 2017 09:40
Horizontal scrolling view both with touch gesture and button press....
import React, { Component } from 'react';
import { StyleSheet, Text, Button, View, ScrollView, Dimensions } from 'react-native';
import styles from './styles';
/*
const styles = StyleSheet.create({
flexBox:{ flex: 1,},
adjustCenter: {justifyContent: 'center', alignItems: 'center',},
adjustTop: {justifyContent: 'flex-start', alignItems: 'center',}
@khalid32
khalid32 / How to kill PORTs in nodejs
Last active January 6, 2020 10:59
kill ports in nodejs...
/* to kill all ports, write in command line... */
pkill node
/* to kill a port through pid */
/* 1st, find id from port */
sudo lsof -i :8081
/* then, kill it */
kill -9 23583