Skip to content

Instantly share code, notes, and snippets.

View iamgideonidoko's full-sized avatar
getting cracked!

ꁅꀤꀸꍟꂦꈤ iamgideonidoko

getting cracked!
View GitHub Profile
@iamgideonidoko
iamgideonidoko / convert-custom-tailwind-text-size.mjs
Created February 5, 2025 07:38
REPLACE TAILWIND CSS (V3) FONT-SIZE CUSTOM FONT WITH VALUE TO ARBITARY CLASSES
// REPLACE TAILWIND CSS (V3) FONT-SIZE CUSTOM FONT WITH VALUE TO ARBITARY CLASSES
/* eslint-disable no-console */
/* eslint-disable @typescript-eslint/no-var-requires */
import { readdirSync, statSync, readFileSync, writeFileSync } from 'fs';
import { join, dirname } from 'path';
import { fileURLToPath } from 'url';
const __dirname = dirname(fileURLToPath(import.meta.url));
const textSizes = {
@iamgideonidoko
iamgideonidoko / convert-tailwind.mjs
Last active February 5, 2025 10:36
CONVERT TAILWIND CSS (V3) PREDEFINED & ARBITRARY CLASSES (WITH REM) FROM 10px BASE TO 16px BASE
// CONVERT TAILWIND CSS (V3) PREDEFINED & ARBITRARY CLASSES (WITH REM) FROM 10px BASE TO 16px BASE
/* eslint-disable no-console */
/* eslint-disable @typescript-eslint/no-var-requires */
import { readdirSync, statSync, readFileSync, writeFileSync } from 'fs';
import { join, dirname } from 'path';
import { fileURLToPath } from 'url';
const __dirname = dirname(fileURLToPath(import.meta.url));
/*
@iamgideonidoko
iamgideonidoko / smart_close_buffer.lua
Last active June 19, 2024 13:36
Smartly close Neovim buffer without closings the window it's in.
local function get_loaded_buffers()
local result = {}
local buffers = vim.api.nvim_list_bufs()
for _, buf in ipairs(buffers) do
if vim.api.nvim_buf_is_loaded(buf) then
table.insert(result, buf)
end
end
return result
end
@iamgideonidoko
iamgideonidoko / theunraveler.zsh-theme
Last active June 27, 2023 05:47
Modified theunraveler zsh theme for style
# Comment
PROMPT='%{$fg[green]%}✋😎 ◄█▓▒░ %c ░▒▓█► ঔৣ꧂ %{$reset_color%}'
RPROMPT='%{$fg[green]%}【$(git_prompt_info)】%{$reset_color%} $(git_prompt_status)%{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX=""
ZSH_THEME_GIT_PROMPT_SUFFIX=""
ZSH_THEME_GIT_PROMPT_DIRTY=""
ZSH_THEME_GIT_PROMPT_CLEAN=""
@iamgideonidoko
iamgideonidoko / color_intensity.js
Created May 21, 2023 06:34
Lighten or darken a color
/**
* Lighten (+ve) or darken (-ve) color.
*
* @param {string} col Color
* @param {number} amt Intensity of light
*/
export const adjustColorIntensity = (col = '#000000', amt = 0) => {
let usePound = false;
if (col[0] === '#') {
@iamgideonidoko
iamgideonidoko / consoleColors.js
Created September 8, 2022 09:03 — forked from abritinthebay/consoleColors.js
The various escape codes you can use to color output to StdOut from Node JS
// Colors reference
// You can use the following as so:
// console.log(colorCode, data);
// console.log(`${colorCode}some colorful text string${resetCode} rest of string in normal color`);
//
// ... and so on.
export const reset = "\x1b[0m"
export const bright = "\x1b[1m"
export const dim = "\x1b[2m"
@iamgideonidoko
iamgideonidoko / cpbar.js
Last active September 26, 2020 23:12
Library for creating circular progress bars
parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({