Skip to content

Instantly share code, notes, and snippets.

View cblanquera's full-sized avatar
🌪️
Breaking Things.

Christian Blanquera cblanquera

🌪️
Breaking Things.
View GitHub Profile
@cblanquera
cblanquera / Documentation-Style-Guide-AI.md
Last active September 2, 2025 09:43
Good for creating outlines and structuring essays.
@cblanquera
cblanquera / Test-Code-Jest-Typescript-ReactJS-Context.md
Last active August 29, 2025 02:45
AI context so it can write better test suites using jest, typescript and reactjs.

Unit Testing Best Practices with Jest + TypeScript (and React)

This context file provides best practices for writing unit tests using Jest with TypeScript, and later, React.
It emphasizes clarity, determinism, and maintainability.


Quick-Start Checklist

  • Mirror source file paths for test files (src/x/y.tstests/x/y.test.ts).
@cblanquera
cblanquera / Test-Code-Mocha-Chai-Typescript-Context.md
Last active August 29, 2025 02:45
AI context so it can write better test suites using mocha, chai and typescript.

🧪 Mocha + Chai + TypeScript Unit Testing

Authoritative guidance for writing unit tests with Mocha + Chai in a TypeScript codebase.
Focus on clarity, determinism, and type safety. Never use any; if unavoidable, use unknown and narrow.


✅ Quick-Start Checklist

  • Test behavior, not internal implementation details.

Nest

Hierarchical data management utilities for nested objects and arrays.

type NestMap = {
  database: Record<string, { host: string, port: number}>
};
const config = new Nest<NestMap>({
 database: {
@cblanquera
cblanquera / Know-Thy-Self-Specs.md
Last active March 20, 2024 06:14
Know Thy Self Specifications: A Web3 Proposal

Know Thy Self (KTS)

The following specification describes a way to verify real people digitally in a pure decentralized way. It's important to know that this is not an idea of a blockchain or company idea more than a practical approach to *Self-Sovereign Identities using basic cryptography.

1. Decentralized Identities

A decentralized identity is an approach to identify and authenticate

@cblanquera
cblanquera / Harlemify.js
Created February 10, 2022 17:37
Harlemify
javascript:(function(){function c(){var e=document.createElement("link");e.setAttribute("type","text/css");e.setAttribute("rel","stylesheet");e.setAttribute("href",f);e.setAttribute("class",l);document.body.appendChild(e)}function h(){var e=document.getElementsByClassName(l);for(var t=0;t<e.length;t++){document.body.removeChild(e[t])}}function p(){var e=document.createElement("div");e.setAttribute("class",a);document.body.appendChild(e);setTimeout(function(){document.body.removeChild(e)},100)}function d(e){return{height:e.offsetHeight,width:e.offsetWidth}}function v(i){var s=d(i);return s.height>e&&s.height<n&&s.width>t&&s.width<r}function m(e){var t=e;var n=0;while(!!t){n+=t.offsetTop;t=t.offsetParent}return n}function g(){var e=document.documentElement;if(!!window.innerWidth){return window.innerHeight}else if(e&&!isNaN(e.clientHeight)){return e.clientHeight}return 0}function y(){if(window.pageYOffset){return window.pageYOffset}return Math.max(document.documentElement.scrollTop,document.body.scrollTop)}funct
@cblanquera
cblanquera / skills-1.json
Created August 17, 2020 08:06
Workforce Skills
[
{
"name": "a certified it technician",
"related_1": "n certified",
"related_2": "network certified",
"related_3": "comptia network certified",
"related_4": "comptia a certification",
"related_5": "a certified professional",
"related_6": "mcdst",
"related_7": "windows 7",
@cblanquera
cblanquera / certs.json
Last active March 22, 2025 21:43
List of academic degrees and certs
[
{
"degree_title": "American Association for Respiratory Care Fellow",
"degree_reference": "AARCF",
"degree_level": "certification"
},
{
"degree_title": "American Registry for Radiologic Technologists",
"degree_reference": "AART",
"degree_level": "certification"
@cblanquera
cblanquera / inline-mjs-modules.html
Created August 4, 2020 12:33
Example polyfill that implements inline js modules
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
</head>
<body>
<script type="mjs" src="./utils">
let n = 1;