Skip to content

Instantly share code, notes, and snippets.

@ejabu
ejabu / bar-chart-with-shadcn-context-menu.tsx
Created September 16, 2025 19:40
Bar Chart, Drill Down with Shadcn context menu
import React, { useState } from 'react';
import { BarChart, Bar, XAxis, YAxis, ResponsiveContainer, Cell } from 'recharts';
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuLabel,
DropdownMenuSeparator,
DropdownMenuSub,
DropdownMenuSubContent,
@ejabu
ejabu / bar-chart.tsx
Created September 16, 2025 19:33
Recharts Drill Down
import React, { useState } from 'react';
import { BarChart, Bar, XAxis, YAxis, ResponsiveContainer, Cell } from 'recharts';
const data = [
{ name: 'Jan', value: 400, details: 'Q1 Performance: Strong growth in new markets' },
{ name: 'Feb', value: 300, details: 'Q1 Performance: Seasonal adjustment period' },
{ name: 'Mar', value: 300, details: 'Q1 Performance: Recovery after February dip' },
{ name: 'Apr', value: 200, details: 'Q2 Performance: Market consolidation phase' },
{ name: 'May', value: 278, details: 'Q2 Performance: Mid-quarter improvement' },
{ name: 'Jun', value: 189, details: 'Q2 Performance: End of quarter challenges' },
@ejabu
ejabu / tsx
Last active August 29, 2025 03:24
In View component React Motion
## MUNCUL BASED ON SCROLL
"use client";
import { AnimatePresence, motion, Variants } from "motion/react";
import Link from "next/link";
import { useEffect, useRef, useState } from "react";
import { NewFadeIn } from "@/components/layout/new-fade-in";
#!/usr/bin/env bash
[ ! -n "$BASH_VERSION" ] && echo "You can only run this script with bash, not sh / dash." && exit 1
set -eou pipefail
SCRIPT_VERSION="v1.4.2"
ARCH=$(uname -m)
WHO=$(whoami)
DEBUG=0
FORCE=0
{
"name": "app-medusa",
"version": "0.0.2-rc.14",
"description": "A starter for Medusa projects.",
"license": "MIT",
"keywords": [
"sqlite",
"postgres",
"typescript",
"ecommerce",
{
"name": "medusa-starter-default",
"version": "0.0.1",
"description": "A starter for Medusa projects.",
"author": "Medusa (https://medusajs.com)",
"license": "MIT",
"keywords": [
"sqlite",
"postgres",
"typescript",
@ejabu
ejabu / OpenSans.css
Created August 30, 2023 05:08 — forked from netzgestaltung/OpenSans.css
CSS for Open Sans
/**
* CSS for Open Sans
* =================
* @Install
* https://google-webfonts-helper.herokuapp.com/fonts/open-sans?subsets=latin
* use modern browser option and subsets you need
* download fonts and upload to your themes font directory
* add the CSS on top of you stylesheet and edit the paths to the current version and relative path of your themes font directory
*
* @Usage
@ejabu
ejabu / CaseMatcher.kt
Created August 30, 2023 05:08 — forked from SuppieRK/CaseMatcher.kt
Regular expressions for case matching
/**
* Different case matchers
*
* @see <a href="https://en.wikipedia.org/wiki/Naming_convention_(programming)#Examples_of_multiple-word_identifier_formats">Examples of multiple word identifier formats</
*/
sealed class CaseMatcher(private val regex: Regex) {
open fun notMatches(source: String?): Boolean {
return !matches(source)
}
@ejabu
ejabu / script.sql
Created February 24, 2023 00:33
Update Odoo admin admin
UPDATE res_users
SET password_crypt = '$pbkdf2-sha512$25000$CmEsBcCY03pPKQWA0LpXqg$c0FLGFu6RglxSY5RnwEMcwu9qOoSxi.LJBaNMMggImIibARChKlTZ.bDfLI9j2q80rMNCa0mqk6oUOvmcoWe0A'
WHERE id = 1;