Skip to content

Instantly share code, notes, and snippets.

View webowodev's full-sized avatar
🏠
Working from home

Dimas Wibowo webowodev

🏠
Working from home
View GitHub Profile
@webowodev
webowodev / backButton.tsx
Last active May 8, 2025 01:09
NextJS Route History Provider to prevent user go outside our app when navigate back
// your back button component
// components/backButton.tsx
'use client';
import { ArrowLeft } from "@phosphor-icons/react";
import { Button } from "./ui/button";
import useRouteHistory from "@/hooks/use-route-history";
import { useRouter } from "next/navigation";
@webowodev
webowodev / generate-env.sh
Created October 23, 2025 01:35
Generate .env file from Vault API
if [ -z "$TOKEN" ]; then
echo "Token not provided!"
exit 1
else
if [ -z "$API_URL" ]; then
echo "Missing the API url, I don't know where the env is :/"
exit 2
else
echo "Getting environment variable from $API_URL"