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 / tailwind-setup.md
Last active August 19, 2023 10:47
Tailwind CSS Setup Guide

Tailwind CSS Setup Guide

Prerequisites

Before you begin, make sure you have Node.js and npm (Node Package Manager) installed on your system.

Getting Started

@shafayeatsumit
shafayeatsumit / patch
Created September 15, 2022 10:02
using patch packages
step 1. yarn add -D patch-package postinstall-postinstall
step 2. make change to the files
setp 3. # run patch-package to create a .patch file
npx patch-package some-package
you will see a new folder is created inside `patches`
step 4.
@shafayeatsumit
shafayeatsumit / stream.js
Created January 28, 2021 13:00 — forked from DingGGu/stream.js
NodeJS Mp3 Streaming ExpressJS
var express = require('express');
var app = express();
var fs = require('fs');
app.listen(3000, function() {
console.log("[NodeJS] Application Listening on Port 3000");
});
app.get('/api/play/:key', function(req, res) {
var key = req.params.key;
import React, {useState, useRef, useEffect} from 'react';
import {
View,
Dimensions,
Animated,
Text,
TextInput,
TouchableOpacity,
Image,
Platform,
@shafayeatsumit
shafayeatsumit / SoftVibration.swift
Created December 5, 2020 17:01
IOS CoreHaptics module for ReactNative.
//
// SoftVibration.swift
// MyTestApp
//
// Created by Shafayeat Kabir on 5/12/20.
//
import Foundation
import CoreHaptics
@shafayeatsumit
shafayeatsumit / gist:4788de8d9b97f6622a894f08671f0422
Last active September 10, 2020 22:55
Adding custom fonts in react native 60+
```
make a folder in root app as : assets then fonts fonts folder in assets and put ttf fonts
make a file in root : react-native-config.js and add:
module.exports = {
project: {
android: {}
},
assets: ['./assets/fonts/'],
};
import React from 'react';
import {StyleSheet, View, Dimensions} from 'react-native';
import Animated from 'react-native-reanimated';
import {PanGestureHandler, State} from 'react-native-gesture-handler';
import {ScreenHeight, ScreenWidth} from '../../helpers/constants/common';
const {width, height} = Dimensions.get('window');
const {
cond,
eq,
add,
@shafayeatsumit
shafayeatsumit / pan.js
Created May 17, 2020 17:02
panresponder
import React, {useRef} from 'react';
import {Animated, View, StyleSheet, PanResponder, Text} from 'react-native';
export default function App() {
const pan = useRef(new Animated.ValueXY()).current;
const panResponder = useRef(
PanResponder.create({
onStartShouldSetPanResponder: () => {
console.log('start');
@shafayeatsumit
shafayeatsumit / hollowCircle.js
Created May 13, 2020 20:22
expand and shrink svg circle in react native
<ImageBackground source={DEFAULT_IMAGE} style={{flex: 1}}>
<Svg width={ScreenWidth} height={ScreenHeight}>
<Mask id="myMask">
<Rect x="0" y="0" width="100%" height="100%" fill="white" />
<Circle
cx={ScreenWidth / 2}
cy={ScreenHeight / 2}
r={100}
fill="black"
/>
@shafayeatsumit
shafayeatsumit / loading.js
Last active February 29, 2020 09:16
loading demo
import React, { useState, useEffect, useContext, Component } from 'react';
import { View, Button } from 'react-native';
import PropTypes from 'prop-types';
import { api } from '../helpers/HttpUtils';
const data = {
medicalInformation: '',
screeningAnswers: [],
uploadedFiles: [