Skip to content

Instantly share code, notes, and snippets.

View mubbashir10's full-sized avatar
🚀
Busy making SaaS Startups Successful!

Mubbashir Mustafa mubbashir10

🚀
Busy making SaaS Startups Successful!
View GitHub Profile
@nijicha
nijicha / install_nodejs_and_yarn_homebrew.md
Last active June 20, 2024 13:06
Install NVM, Node.js, Yarn via Homebrew
@gholker
gholker / download-aws-logs.sh
Last active November 28, 2023 11:01
Script that uses the aws cli to download cloudwatch logs to a file
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
LOG_GROUP_NAME=""
LOG_STREAM_NAME=""
REGION=""
OUTPUT_FILE="$(date +"%Y%m%d").log"
@fnky
fnky / BetterFixedLazyExample.jsx
Last active November 29, 2019 13:45
Lazy conditionals and refs
function BetterFixedLazyExample({ lazyValue }) {
// Initialize with null value.
const myRef = useRef(null);
useLayoutEffect(() => {
console.log(myRef.current); // => HTMLDivElement DOM node
}, []);
// Make sure the ref setter is not blocked by conditionals.
return (