Skip to content

Instantly share code, notes, and snippets.

View goforbg's full-sized avatar
🎯
Focusing

Bharadwaj Giridhar goforbg

🎯
Focusing
View GitHub Profile
---
name: Build and Push Docker Image to AWS ECR
on:
push:
branches: [ master ]
env:
A_ACCESS: '${{ secrets.A_ACCESS }}'
A_SECRET: '${{ secrets.A_SECRET }}'
FOO: '${{ secrets.FOO }}'
@goforbg
goforbg / Sample Docker File to Build Next JS App With Env Variables from Github Secets and Actions
Created March 6, 2022 17:22
Sample Docker File to Build Next JS App With Env Variables from Github Secets and Actions
FROM node:14
ARG FOO=${FOO}
ENV FOO=${FOO}
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
@goforbg
goforbg / Embed Youtube Video Circle Bottom Left Tailwind
Last active March 9, 2022 12:34
Embed Youtube Video Circle Bottom Left Tailwind
const [playingDemo, setPlayingDemo] = useState(0)
const [scrollTop, setScrollTop] = useState(0);
const [loaded, setLoaded] = useState(false)
useEffect(() => {
const onScroll = (e) => {
setScrollTop(e.target.documentElement.scrollTop);
@goforbg
goforbg / gist:e72fa18754a2f1456a9f43d87f3f67a9
Created June 21, 2022 04:04
Get Query Params in Next JS without Next JS Router
//https://regex101.com/r/gmICzZ/1
const params = new URLSearchParams(window.location.href.match(/\?.*/)[0]);
const callBackUrl = params?.get("callbackUrl")
@goforbg
goforbg / inboxpirates-integration-helper.js
Created January 14, 2024 13:12
Inboxpirates Helper Functions
const htmlToFormattedText = require("html-to-formatted-text");
export const stringToBoolean = (string) => {
if (!string) {
return false;
}
switch (`${string}`?.toLowerCase().trim()) {