Skip to content

Instantly share code, notes, and snippets.

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

Hams Kuveluka hamswaldenkv

🏠
Working from home
  • Congo Kinshasa
  • 02:42 - 1h ahead
  • X @hamsddxn
View GitHub Profile
@hamswaldenkv
hamswaldenkv / mariadb-brew-macos.md
Created April 14, 2025 23:13 — forked from nickcernis/mariadb-brew-macos.md
Install MariaDB with brew on macOS and fix the “access denied” issue

Attempting mysql -u root fails with Access denied for user 'root'@'localhost immediately after doing brew install mariadb and starting mariadb with brew services start mariadb.

To fix it (with MariaDB still running):

  1. sudo mysql then enter your Mac user password
  2. ALTER USER 'root'@'localhost' IDENTIFIED BY 'newrootpassword'; replacing newrootpassword with the password you wish to use for the MariaDB root user.
  3. Ctrl-C to exit mysql.

You should then be able to connect to MariaDB with mysql -u root -p, then entering the root password when prompted.

@hamswaldenkv
hamswaldenkv / data-table.tsx
Created November 22, 2024 13:25 — forked from nicostombros/data-table.tsx
Shadcn UI implementation of DataTable and Pagination components working together
// same as your regular shadcn datatable implementation (which uses tanstack table)
// note that the shadcn datatable uses shadcn table for the ui. see https://ui.shadcn.com/docs/components/data-table
import {
ColumnFiltersState,
SortingState,
VisibilityState,
flexRender,
getCoreRowModel,
getFilteredRowModel,
@hamswaldenkv
hamswaldenkv / youtube-channel.tsx
Created April 10, 2024 07:21 — forked from steven-tey/youtube-channel.tsx
YoutubeChannel RSC
import { BlurImage, YouTube } from "@dub/ui";
import { nFormatter } from "@dub/utils";
import { Eye, UserCheck, Video } from "lucide-react";
import { Suspense } from "react";
export function YoutubeChannel({ id }: { id: string }) {
return (
<Suspense fallback={<div className="not-prose grid gap-4"></div>}>
<YoutubeChannelRSC id={id} />
</Suspense>
@hamswaldenkv
hamswaldenkv / GetWeeksInMonth.js
Created August 29, 2020 09:22 — forked from markthiessen/getWeeksInMonth.js
JavaScript - get weeks in a month as array of start and end days
//note: month is 0 based, just like Dates in js
function getWeeksInMonth(month, year){
var weeks=[],
firstDate=new Date(year, month, 1),
lastDate=new Date(year, month+1, 0),
numDays= lastDate.getDate();
var start=1;
var end=7-firstDate.getDay();
while(start<=numDays){
@hamswaldenkv
hamswaldenkv / index.html
Created October 6, 2018 07:22
Simple react popup example
<div id="content"></div>