Skip to content

Instantly share code, notes, and snippets.

View uncledevhq's full-sized avatar
🇿🇲
Focusing

Chomba uncledevhq

🇿🇲
Focusing
View GitHub Profile
@uncledevhq
uncledevhq / Readme.md
Created June 24, 2025 10:48
Husky & Pre-commit Setup Guide - Bongohive consult

Husky & Pre-commit Setup Guide

This guide explains how to set up Husky and pre-commit protection for your Next.js project to ensure code quality and consistency across your development team.

What is Husky?

Husky is a tool that allows you to easily add Git hooks to your project. Git hooks are scripts that run automatically before or after Git commands like commit, push, etc. This setup helps maintain code quality by running checks before code is committed.

What is lint-staged?

@uncledevhq
uncledevhq / crawler1.0.py
Created January 16, 2025 07:41
Crawl websites for inforamtion
import requests
from bs4 import BeautifulSoup
from urllib.parse import urljoin, urlparse
import re
from collections import defaultdict
import nltk
from nltk.tokenize import sent_tokenize
from nltk.corpus import stopwords
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.cluster import KMeans
@uncledevhq
uncledevhq / gist:daeb45efbd28bb67d53d4e257daad32f
Created January 16, 2024 10:24
Local-Push-Notifications-App.tsx
import { StatusBar } from "expo-status-bar";
import { Button, Platform, StyleSheet, Text, View } from "react-native";
// notifications imports
import * as Device from "expo-device";
import * as Notifications from "expo-notifications";
import Constants from "expo-constants"; // Optional
// Initialize the notification service
Notifications.setNotificationHandler({
@uncledevhq
uncledevhq / microcosm-onix-bisac-codes.csv
Created March 2, 2022 13:44 — forked from natebeaty/microcosm-onix-bisac-codes.csv
ONIX BISAC codes from microcosm publishing database, with some manually entered codes — use at your own risk!
ANT000000 Antiques & Collectibles / General
ANT001000 Antiques & Collectibles / Americana
ANT002000 Antiques & Collectibles / Art
ANT003000 Antiques & Collectibles / Autographs
ANT005000 Antiques & Collectibles / Books
ANT006000 Antiques & Collectibles / Bottles
ANT007000 Antiques & Collectibles / Buttons & Pins
ANT008000 Antiques & Collectibles / Care & Restoration
ANT009000 Antiques & Collectibles / Transportation
ANT010000 Antiques & Collectibles / Clocks & Watches
@uncledevhq
uncledevhq / closures.js
Last active January 10, 2022 16:53
Learning closures with experiments. Javascript the hard partsyes the Hapas
console.log("thenxtlvls 🚀 ", 2022);
// using clousures create a function that tracks how many times it's been called
// and exit when limit is reached. Reset the counter back to zero.
function functionCreatorWithLimit(limit) {
let counter = 0;
function functionToBeCalledWithDefinedLimit () {
if (counter >= limit ) {
console.log(`Limit of (${counter}) calls is reached, the counter has rested back to zero and you can run again`)
counter = 0;
@uncledevhq
uncledevhq / script.js
Created January 8, 2022 17:53
copy text to clipboard
// console.log("thenxtlvls", 2022);
function copyContentToClipboard (content) {
console.log(content, "to be copied")
navigator.clipboard.writeText(content).then(function() {
alert("text copied to clipboard")
}, function() {
alert("Oops! Couldnt copy text to clipboard")
})
}
// Paste in your browser console
const kamba = vokamba => {
const sp = new SpeechSynthesisUtterance(vokamba);
[sp.voice] = speechSynthesis.getVoices();
speechSynthesis.speak(sp);
};
kamba('My name is chomba chanda, an intern at bongohive');
@uncledevhq
uncledevhq / .ts
Created May 27, 2021 04:40
Learning-typescript-types
let myStr: string;
let myNumber: number;
let myBool: boolean;
let myVar: any;
let strNumTuple: [string, number];
//voidi
let myVoid: void = undefined;
@uncledevhq
uncledevhq / index.html
Created April 12, 2021 10:51
Survey Form
<main id="main-container">
<header id="header-section">
<h1 id="title">
School to Newsletter survey
</h1>
<p id="descripltioln">
Lastly, we’ll drag and drop a button and edit the text to “Add to cart” and link it up to a fresh new screen.
</p>
</header>
@uncledevhq
uncledevhq / index.html
Created April 12, 2021 08:17
Tribute Page
<main id="main">
<header>
<h1 id="title">Nelson Mandela</h1>
<h3>A man guided with hope, not fear.</h3>
</header>
<div id="img-div">
<img src="https://miro.medium.com/max/990/1*4q3MqQCFB_gy_ckqz6gomQ.jpeg" alt="nelson mandela" id="image">
<span id="img-caption">
Photo Credit: Boston Big Picture
</span>