Skip to content

Instantly share code, notes, and snippets.

View ShahrozTanveer's full-sized avatar
🚀
Probably Stuck in an event loop.

Sharoz Tanveer ShahrozTanveer

🚀
Probably Stuck in an event loop.
View GitHub Profile
@ShahrozTanveer
ShahrozTanveer / app.js
Created March 5, 2021 14:00
Handle responsiveness using javascript in React Functional component (with hooks)
import React,{useState,useEffect} from 'react'
export default function App(){
const [isMobile, setIsMobile] = useState(false)
useEffect(() => {
window.addEventListener('resize', handleWindowResize);
return () => {
window.removeEventListener('resize', handleWindowResize);
}
}, [])
const handleWindowResize = () => {
@ShahrozTanveer
ShahrozTanveer / native-base-ions.md
Last active February 15, 2023 13:29
Icons list used with Native base

Native Base Ions List

  • "ios-add"
  • "ios-add-circle"
  • "ios-add-circle-outline"
  • "ios-add-outline"
  • "ios-alarm"
  • "ios-alarm-outline"
  • "ios-albums"
  • "ios-albums-outline"
  • "ios-alert"
@ShahrozTanveer
ShahrozTanveer / script.py
Last active January 29, 2021 19:20
Simple use of PostgresSql in Python using psycopg2
import psycopg2
#Create Connection to PostgreSQL
connection = psycopg2.connect(
host = "localhost",
database="system",
user = "<your user name>",
password = "<your password>")