Skip to content

Instantly share code, notes, and snippets.

View minhajul-islam's full-sized avatar

minhajul-islam

  • https://goo.gl/maps/FQ4t2W4yx8y2hwJB7
View GitHub Profile

Router

  • app.js
const express = require('express');
const  http = require('http');
const  fs = require('fs');
const app = express();
const adminRouter = express.Router();
@minhajul-islam
minhajul-islam / media-queries
Created December 16, 2020 16:44 — forked from robabby/media-queries
A comprehensive list of media queries forked from Bootstrap and Foundation frameworks
// Bootstrap
/* Custom, iPhone Retina */
@media only screen and (min-width : 320px) {
}
/* Extra Small Devices, Phones */
@media only screen and (min-width : 480px) {
@minhajul-islam
minhajul-islam / validate_wrapper.js
Last active August 6, 2020 05:23
form validation for react native
import validation from 'validate.js';
export default function validate(fieldName, value) {
let constraints = {
email: {
presence: true,
format: {
pattern: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
message: 'Invalid email id',
},
},
@minhajul-islam
minhajul-islam / form validation react native
Created August 6, 2020 05:20
form validation react native
form validation react native
@minhajul-islam
minhajul-islam / Android & iPhone X(NOS)
Created December 17, 2019 09:42
Android & iPhone X(NOS) : SafeArea on top on the action bar
import {
...
SafeAreaView
} from 'react-native';
class Main extends React.Component {
render() {
return (
<SafeAreaView style={styles.safeArea}>
<App />
</SafeAreaView>
@minhajul-islam
minhajul-islam / AsyncStorage size config
Created December 3, 2019 11:18
Increase Storage size
// helpers/Storage.js
import {createAsyncStorage} from '@react-native-community/async-storage';
const AsyncStorage = createAsyncStorage(100 * 1024 * 1024);
export default AsyncStorage;
@minhajul-islam
minhajul-islam / API_STATUS
Created November 20, 2019 05:07
List of HTTP status codes
export const API_STATUS = {
//1×× Informational
AS_100: {'CODE':100,'DES': 'Continue'},
AS_101: {'CODE':101,'DES': 'Switching Protocols'},
AS_102: {'CODE':102,'DES': 'Processing'},
//2×× Success
AS_200: {'CODE':200,'DES': 'OK'},
AS_201: {'CODE':201,'DES': 'Created'},
AS_202: {'CODE':202,'DES': 'Accepted'},
AS_203: {'CODE':203,'DES': 'Non-authoritative Information'},
@minhajul-islam
minhajul-islam / redux-actions-io.js
Created November 18, 2019 08:08
redux/actions/io.js
import {
LOADING_START,
LOADING_END,
REDIRECT_TO_MANAGE_PAGE,
GET_TOKEN,
SAVE_TOKEN,
REMOVE_TOKEN,
ERROR,
} from '../constent/io';
import asyncStore from 'react-native-simple-store';
import {Alert, Share} from 'react-native';
import {NavigationActions, StackActions} from 'react-navigation';
import {ALL_SCREEN} from './Constants';
let moment = require('moment');
const date1 = (text) => {
return moment(text).format('D MMMM YYYY');
};
let shareAp = () => {