Skip to content

Instantly share code, notes, and snippets.

View TunvirRahman's full-sized avatar
🎯
Focusing

Tunvir Rahman Tusher TunvirRahman

🎯
Focusing
View GitHub Profile
const someObject = {
title: null,
subTitle: "Subtitle",
buttonColor: null,
disabled: true
};
function creteOption(someObject) {
const newObject = Object.assign({
title: "Default Title",
subTitle: "Default Subtitle",
const someObject = {
title: null,
subTitle: "Subtitle",
buttonColor: null,
disabled: true
};
function createOption(someObject) {
someObject.title = someObject.title || "Default Title";
someObject.subTitle = someObject.subTitle || "Default Subtitle";
someObject.buttonColor = someObject.buttonColor || "blue";
const UserRole = {
ADMIN: "Admin",
GENERAL_USER: "GeneralUser",
SUPER_ADMIN: "SuperAdmin",
};
function getRoute(userRole = "default role"){
switch(userRole){
case UserRole.ADMIN:
someFunction(str){
const conditions = ["someValue1","someValue2"];
return conditions.some(condition=>str.includes(condition));
}
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
void main() {
runApp(MaterialApp(
home: Home(),
));
}
REACT_APP_STAGE = Test
@TunvirRahman
TunvirRahman / .env.production
Created June 8, 2020 09:32
.env.production
REACT_APP_STAGE = Production
@TunvirRahman
TunvirRahman / .env.development
Created June 8, 2020 09:31
.env.development
REACT_APP_STAGE = development
"scripts": {
....
"start:stage:dev": "env-cmd -f .env.development react-scripts start",
"start:stage:prod": "env-cmd -f .env.production react-scripts start",
"start:stage:test": "env-cmd -f .env.test react-scripts start",
"build:stage:dev": "env-cmd -f .env.development react-scripts build",
"build:stage:prod": "env-cmd -f .env.production react-scripts build",
"build:stage:test": "env-cmd -f .env.test react-scripts build",
....
},
/***
* .::::.
* .::::::::.
* ::::::::::: FUCK YOU
* ..:::::::::::'
* '::::::::::::'
* .::::::::::
* '::::::::::::::..
* ..::::::::::::.
* ``::::::::::::::::