Sticky Posts
Categories
manual
excerpt
Post List
ANSI Escape Sequences
repost: ANSI Escape Codes · GitHub
# ANSI Escape Sequences
Standard escape codes are prefixed with Escape :
Ctrl-Key: ^[
Octal: \033
Unicode: \u001b
Hexadecimal: \x1B
Decimal: 27
Followed by the command, somtimes delimited by opening square bracket ( [ ), known as a Control Sequence...
more...
Linux Q&A
# Q1: Why does bash background_process.sh produce no output for jobs ?
1cat background_process.sh
12345#!/bin/bash# run sleep command for 300, 400, and 500 secondssleep 300 &sleep 400 &sleep 500 &
123456789bash background_process.shjobssleep 300 &[1] 66560jobs[1]+...
more...
Rust Q&A
# Q1: Why are Box and dyn required in Vec<Box<dyn Sale>> ?
dyn — opts into dynamic dispatch
Without dyn , Rust uses static dispatch (generics/monomorphization), meaning only one concrete type per collection. dyn Sale tells the compiler: “I don’t know the exact type at...
more...
Vue 3 vs React Cheatsheet
# Table of Contents
Component Structure
Reactive State
Computed / Memoization
Event Handlers & Methods
Watchers / Effects
Lifecycle Hooks
Props & Communication
Two-Way Binding
Template Refs / DOM Refs
Context / Provide-Inject
Composables / Custom Hooks
Conditional Rendering
List...
more...
Introduction to concurrent.futures in Python
repost: Introduction to concurrent.futures in Python - smrati katiyar
Concurrency in Python can be efficiently handled using the concurrent.futures module. This module provides a high-level interface for asynchronously executing function calls using either threads or processes. It allows you to run...
more...
Most Developers Don’t Know Python Has a Built-In Config File Parser
repost: Most Developers Don’t Know Python Has a Built-In Config File Parser - mata
# Stop reinventing the wheel with YAML, JSON, or TOML — Python already has *configparser* baked in.
Every developer has faced the same problem at some point:
Where do you put all those environment-specific values —...
more...
Determine Whether Two Date Ranges Overlap
repost: datetime - Determine Whether Two Date Ranges Overlap - Stack Overflow
# Question
Given two date ranges, what is the simplest or most efficient way to determine whether the two date ranges overlap?
As an example, suppose we have ranges denoted by DateTime variables StartDate1 to EndDate1 and...
more...
async / await in forEach loop
repost: async / await in forEach loop 🤯. Hey! I recently was working on a… | by Nick Graffis | Medium
Hey! I recently was working on a project that had me looping through an array of table names, and wanted to see if each table existed in a MySQL database. Create one if it didn’t exist, then log...
more...
Run gists using npx
repost: Run gists using npx - DEV Community
We can run gists using npx. I learned about that after reading this: https://nodejs.dev/learn/the-npx-nodejs-package-runner.
# I want to run my gist
I created a gist that prints some text. I ran the command, but it didn’t work. I figured I needed...
more...
findByText() vs getByText() vs queryByText()- React Testing Library
repost: findByText() vs getByText() vs queryByText()- React Testing Library | by Anjali Ajith | Medium
I have a short-term memory span, so here i am writing blog posts to re-enforce long-term memory. It’s not going to be perfect .
# Cheat Grid
Check if something is on screen right now:...
more...









