Skip to content

Instantly share code, notes, and snippets.

View anataliocs's full-sized avatar
🎓
Completed Polkadot Blockchain Academy Cohort 7 Bali

Chris Anatalio anataliocs

🎓
Completed Polkadot Blockchain Academy Cohort 7 Bali
View GitHub Profile
@anataliocs
anataliocs / ascii-art-aim-myspace-away-message.txt
Created December 4, 2025 07:49
Ascii art examples from a bygone era of AIM away messages and Myspace emo profiles
𓏫 ♡⃟͚̊ ྀ࿔ ₇₇₇
◟ ͜◞ ྀི︶ₛᵘc͟𝓀 𝒾𝓉 ᥲ𝒾 ̥̈ ͜𓏼˚̣̣̣𐂯
𓎢 ᭄ c͟𝒽ᥲ𝓉GPT is gඞy 𓈒 ͜͝ | ͜͝ |།ིྀ ̥̈ ͜𓏼˚̣̣̣𐂯
⛧°。⋆༺♱༻⋆。°⛧
✮₊⊹₊⋆ ☠︎︎ ⋆₊ ⊹✮
✩♬ ₊˚.🎧⋆☾⋆⁺₊✧
@anataliocs
anataliocs / shut-down-process.sh
Last active December 4, 2025 06:11
Search for and kill processes running on a certain port with a specific command name
#!/bin/bash
set -e
port="9944"
printf "\nSearches for processes running on port %s and performs a kill 9 on each pid" "$port"
printf "\n------------------------- \n"
printf "\nPrinting output from command: lsof -i :%s \n" "$port"
lsof -i :$port
@anataliocs
anataliocs / start-docusaurus.sh
Last active December 3, 2025 14:32
Start docusaurus and export logs to file
#!/bin/bash
set -e
touch docs.log
chmod 775 docs.log
nohup yarn start --port 3000 > docs.log 2>&1 & echo $! > run.pid
echo "Docusaurus running on process: $(cat run.pid)"
echo "Docusaurus running on port 3000"
echo ""
@anataliocs
anataliocs / quote-json-keys.js
Created November 24, 2025 17:52
When you console.log() a JSON config, the object keys may not be quoted. This script will take in a file and wrap all the object keys in double quotes
// Utility script: Wrap all unquoted parameter names (object keys) with double quotes
// Usage: quote-json-keys.js
const fs = require('fs');
const path = require('path');
const filePath = path.join(__dirname, 'config.json');
let text = fs.readFileSync(filePath, 'utf8');
@anataliocs
anataliocs / main.md
Created November 10, 2025 19:16 — forked from hediet/main.md
Proof that TypeScript's Type System is Turing Complete
type StringBool = "true"|"false";


interface AnyNumber { prev?: any, isZero: StringBool };
interface PositiveNumber { prev: any, isZero: "false" };

type IsZero<TNumber extends AnyNumber> = TNumber["isZero"];
type Next<TNumber extends AnyNumber> = { prev: TNumber, isZero: "false" };
type Prev<TNumber extends PositiveNumber> = TNumber["prev"];
@anataliocs
anataliocs / git.md
Last active May 14, 2025 06:28
Stellar Toronto Builder Summit—EasyA Consensus Hackathon 2025 Helpful Scripts

Reset Repo and Re-choose front-end framework

Reset vanillajs and

git add . && git stash && rm -rf node_modules && rm -rf snapchain-vanillajs/target

Reset astro

Mermaid on Github Examples

All of these diagrams are dynamically rendered during html display by Github, the images generated from text inside the Github-Flavored Markdown. None are static images. Mermaid support was released for Github on 2022-02-14

Pros & Cons:

  • Pro: You don't need to care about the layout.
  • Con: You cannot control the layout.

Notes:

  • Not all the features of Mermaid (in particular symbols B--&gt;C[fa:fa-ban forbidden], hyperlink and tooltips) are supported by Github.
@anataliocs
anataliocs / eventsource.js
Created May 7, 2025 11:05 — forked from mattpodwysocki/eventsource.js
Adding support for server-sent events for RxJS
if (!!root.EventSource) {
/**
* This method wraps an EventSource as an observable sequence.
* @param {String} url The url of the server-side script.
* @param {Observer} [openObserver] An optional observer for the 'open' event for the server side event.
* @returns {Observable} An observable sequence which represents the data from a server-side event.
*/
dom.fromEventSource = function (url, openObserver) {
return new AnonymousObservable(function (observer) {
use std::ffi::{OsStr, OsString};
let as_ref1: OsString = OsString::from(OsString::from("stellar contract build"));
assert_eq!("stellar contract build", as_ref1);
@anataliocs
anataliocs / list-of-curl-options.txt
Created July 18, 2024 17:58 — forked from eneko/list-of-curl-options.txt
List of `curl` options
$ curl --help
Usage: curl [options...] <url>
--abstract-unix-socket <path> Connect via abstract Unix domain socket
--alt-svc <file name> Enable alt-svc with this cache file
--anyauth Pick any authentication method
-a, --append Append to target file when uploading
--basic Use HTTP Basic Authentication
--cacert <file> CA certificate to verify peer against
--capath <dir> CA directory to verify peer against
-E, --cert <certificate[:password]> Client certificate file and password