Skip to content

Instantly share code, notes, and snippets.

# Decimal to Hexadecimal
0 00 | 16 10 | 32 20 | 48 30 | 64 40 | 80 50 | 96 60 | 112 70 | 128 80 | 144 90 | 160 A0 | 176 B0 | 192 C0 | 208 D0 | 224 E0 | 240 F0
1 01 | 17 11 | 33 21 | 49 31 | 65 41 | 81 51 | 97 61 | 113 71 | 129 81 | 145 91 | 161 A1 | 177 B1 | 193 C1 | 209 D1 | 225 E1 | 241 F1
2 02 | 18 12 | 34 22 | 50 32 | 66 42 | 82 52 | 98 62 | 114 72 | 130 82 | 146 92 | 162 A2 | 178 B2 | 194 C2 | 210 D2 | 226 E2 | 242 F2
3 03 | 19 13 | 35 23 | 51 33 | 67 43 | 83 53 | 99 63 | 115 73 | 131 83 | 147 93 | 163 A3 | 179 B3 | 195 C3 | 211 D3 | 227 E3 | 243 F3
4 04 | 20 14 | 36 24 | 52 34 | 68 44 | 84 54 | 100 64 | 116 74 | 132 84 | 148 94 | 164 A4 | 180 B4 | 196 C4 | 212 D4 | 228 E4 | 244 F4
5 05 | 21 15 | 37 25 | 53 35 | 69 45 | 85 55 | 101 65 | 117 75 | 133 85 | 149 95 | 165 A5 | 181 B5 | 197 C5 | 213 D5 | 229 E5 | 245 F5
6 06 | 22 16 | 38 26 | 54 36 | 70 46 | 86 56 | 102 66 | 118 76 | 134 86 | 15
@jabed-web-dev
jabed-web-dev / console-runner.cmd
Last active November 2, 2022 09:38
Console Runner
@echo off
@setlocal
call :setESC
title node %*
cls
echo %ESC%[34m[Running]%ESC%[96m node %* %ESC%[0m
echo:
:: Runs your command
/* Style
0 = Reset All
1 = Bright or Bold
2 = Dim
3 = Italic
4 = Underline
5 = Blinking
6 = Blinking
7 = Inverse
8 = Hidden
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"palette": {
"background": "#29245a",
"root": "#e6b104",
"shell": "#4690ff",
"user": "#73ecfc",
"path": "#3EC669",
"git-foreground": "#41dbfd",
"git-modified": "#FF9248",
@jabed-web-dev
jabed-web-dev / gitdown.js
Last active November 3, 2024 21:22
Download directory and files from github repository
require('dotenv').config();
const { Octokit } = require("@octokit/rest");
const download = require('download');
const { resolve } = require('path')
const octokit = new Octokit({
auth: process.env.GITHUB_ACCESS_TOKEN
})
function fileData(file, obj = {}) {
@jabed-web-dev
jabed-web-dev / Iterator.js
Created August 23, 2022 01:28
Node.js fs.readdir recursive directory search
const { resolve, join } = require('path');
const { readdir } = require('fs').promises;
async function getFiles(dir) {
const dirents = await readdir(dir, { withFileTypes: true });
const files = await Promise.all(dirents.map((dirent) => {
const res = resolve(dir, dirent.name);
return dirent.isDirectory() ? getFiles(res) : res;
}));
return Array.prototype.concat(...files);
Regular space:  
Two spaces gap:  
Four spaces gap:  
@jabed-web-dev
jabed-web-dev / Node JS input from command line.js
Last active October 21, 2023 03:34
Node JS input from command line using readline
//********** app.js ***********//
const readline = require('./readline');
function main(rlc) {
function calculator() {
readline('Enter your numbers or operator (1 + 2): ', (value, rl) => {
let result;
let num1 = +value.split(' ')[0];
let opt = value.split(' ')[1];
let num2 = +value.split(' ')[2];