Skip to content

Instantly share code, notes, and snippets.

View shafayeatsumit's full-sized avatar
👓
Working on my algo skills

Shafayeat Kabir Sumit shafayeatsumit

👓
Working on my algo skills
  • Dhaka, Bangladesh
View GitHub Profile
@shafayeatsumit
shafayeatsumit / navigaiton.js
Created December 20, 2019 12:29
complex nav example
import React from 'react';
import { createDrawerNavigator } from 'react-navigation-drawer';
import { createAppContainer, createSwitchNavigator } from 'react-navigation';
import { createStackNavigator } from 'react-navigation-stack';
import { createBottomTabNavigator } from 'react-navigation-tabs';
import Example from './Example';
@shafayeatsumit
shafayeatsumit / Courousel.js
Created November 13, 2019 05:10
react native snap courousel
import React, { Component } from 'react';
import {
Animated,
FlatList,
I18nManager,
Platform,
View,
ViewPropTypes,
} from 'react-native';
import PropTypes from 'prop-types';
@shafayeatsumit
shafayeatsumit / JS wired parts
Created October 26, 2019 14:09
JS understanding the wired parts
# Conceptual Aside
# Syntax Parsers
# Lexical Environments
# Execution Contexts
## Syntax Parsers
A PROGRAM THAT READS YOUR CODE AND DETERMINES WHAT IT DOES AND IF ITS GRAMMER IS VALID
## Lexical Environments
WHERE SOMETHINGS SITS PHYSICALLY IN THE CODE YOU WRITE. Whrere it's written and what surrounds it.
@shafayeatsumit
shafayeatsumit / HamburgerDummy.js
Created June 11, 2019 06:23
HamburgerButton animation
import React, { Component } from 'react';
import { StyleSheet, Animated, View, Dimensions, TouchableOpacity } from 'react-native';
const {
width,
height
} = Dimensions.get('window');
const SQUARE_DIMENSIONS = 80;
modals () {
const { modalName } = this.props;
if ( modalName === 'nameAndPic') {
const title = "Name and Profile Pic"
return (
<View style={styles.mainContainer} >
{this.modalHeader(title)}
<View style={styles.modalBoby} >
<NameAndPicSettings {...this.props}/>
</View>
@shafayeatsumit
shafayeatsumit / pulsecircle.js
Created November 6, 2018 12:06
making a pulse circle using mapboxgl api
import React from 'react';
import PropTypes from 'prop-types';
import { Animated } from 'react-native';
import MapboxGL from '@mapbox/react-native-mapbox-gl';
const styles = MapboxGL.StyleSheet.create({
innerCircle: {
@shafayeatsumit
shafayeatsumit / clean_code.md
Created August 14, 2018 04:34 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@shafayeatsumit
shafayeatsumit / rn-inapppurchase.md
Last active April 16, 2018 12:07
how to implement in app purchase in react native
@shafayeatsumit
shafayeatsumit / vscode.md
Last active April 5, 2018 06:12
vscode commands

pick virtual env

cmd + shift + p

Type : Python: Select Interpreter

pick one from there

understanding path

When you run a command like python or pip, your operating system searches through a list of directories to find an executable file with that name. This list of directories lives in an environment variable called PATH, with each directory in the list separated by a colon: /usr/local/bin:/usr/bin:/bin

@shafayeatsumit
shafayeatsumit / nodelearn.markdown
Last active March 28, 2018 15:07
In an effort to learn node js .This gist consists of some code snippets and small chunk texts that helped me to learn node.

Learn Me Node

A Node.js application involves following 3 steps :

  • Import required modules − We use the require directive to load Node.js modules.
  • Create server − A server which will listen to client’s requests similar to Apache HTTP Server.
  • Read request and return response − The server created in an earlier step will read the HTTP request made by the client which can be a browser or a console and return the response.

http server

const http = require('http');