Skip to content

Instantly share code, notes, and snippets.

View koolamusic's full-sized avatar
🎯
Focusing

U.M Andrew koolamusic

🎯
Focusing
View GitHub Profile
@koolamusic
koolamusic / club.sol
Last active February 2, 2024 13:50
syndicate.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
library ClubLibrary {
struct Club {
uint256 id;
string name;
uint256 minimumToEnter;
mapping(address => Member) members;
uint256 memberCounter;
@koolamusic
koolamusic / hex-colors.txt
Created June 20, 2023 11:35 — forked from aileftech/hex-colors.txt
A Bash one-liner to produce a list of HEX color codes that read like (supposedly) valid English words
$ grep -P "^[ABCDEFabcdefOoIi]{6,6}$" /usr/share/dict/words | tr 'OoIi' '0011' | tr '[:lower:]' '[:upper:]' | awk '{print "#" $0}'
#ACAD1A
#B0BB1E
#DEBB1E
#AB1DED
#ACAC1A
#ACCEDE
#AC1D1C
#BAB1ED
#BA0BAB
# coding=utf-8
# Copyright 2023 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@koolamusic
koolamusic / class.md
Last active September 30, 2023 10:38
Blog Mermaids
classDiagram
    class User {
        +String username
        +String email
        +login()
        +book()
    }
    class Booking {
 +Int bookingID
@koolamusic
koolamusic / jwt-utils.ts
Created April 11, 2023 16:11
JWT utilities
/// @see https://github.com/nextauthjs/next-auth/blob/main/packages/core/src/jwt.ts
import { hkdf } from "@panva/hkdf"
import { EncryptJWT, jwtDecrypt } from "jose"
/// @see also https://github.com/panva/paseto
async function getDerivedEncryptionKey(secret: string) {
return await hkdf(
"sha256",
secret,
@koolamusic
koolamusic / sen_dist.json
Created January 27, 2023 09:22
Inec Senatorial Districts 2022
[
{
"DistrictNo": "1",
"DistrictName": "ABIA NORTH ",
"Code": "SD/001/AB",
"Composition": "UMUNNEOCHI, ISUKWUATO, OHAFIA, AROCHUKWU, BENDE",
"CollationCenter": "COUNCIL HALL OHAFIA LGA HQS "
},
{
"DistrictNo": "2",
@koolamusic
koolamusic / hogfather_lga.json
Last active January 26, 2023 17:40
GeoJSON for Nigeria used in Visualization Libraries
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@koolamusic
koolamusic / html_tabs.html
Created October 13, 2022 16:13
A pure HTML, CSS & JS implementation of tabs > inspired by https://www.w3schools.com/howto/howto_js_tabs.asp
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {font-family: Arial;}
/* Style the tab */
.tab {
overflow: hidden;
@koolamusic
koolamusic / signature.html
Created September 30, 2022 01:11
Email signature personal
<table role="presentation" style="border: medium none; margin: 0px; border-collapse: collapse; width: 100%; max-width: 620px;"><tbody><tr><td style="vertical-align: top; padding-right: 8px; padding-bottom: 0px; width: 50px;"><table role="presentation" class="wrapper" style="border: medium none; margin: 0px; border-collapse: collapse; width: 100%; max-width: 620px;"><tbody><tr><td><table role="presentation" style="border: medium none; margin: 0px; border-collapse: collapse; width: 100%; max-width: 620px;"><tbody><tr><td><div style="width: 40px; height: 40px;"><a href="https://peerlist.io/0xalzzy" style="text-decoration: none;" target="_blank" rel="noreferrer" title="Andrew"><img src="https://lh3.googleusercontent.com/a-/AOh14Ghb_hvoLImrbLxOK5VwNOJ369hSY8EKOdNVupOW=s96-c" alt="Andrew" style="width: 100%; height: 100%; border-radius: 20px; flex-shrink: 0;"></a></div></td></tr></tbody></table></td></tr></tbody></table></td><td><table role="presentation" style="border: medium none; margin: 0px; border-collapse: co
@koolamusic
koolamusic / .block
Created August 12, 2022 17:18 — forked from mbostock/.block
Lab and HCL Color Spaces
license: gpl-3.0