Skip to content

Instantly share code, notes, and snippets.

@ironwolphern
ironwolphern / deploy-linux-template-proxmox.sh
Last active December 26, 2024 22:17
This script will download a cloud image and deploy it as a template in Proxmox VE
#!/bin/bash
# This script will download a cloud image and deploy it as a template in Proxmox VE
# Tested on Proxmox VE 8.2.4
clear
# Default values for cloud template
MEMORY="512"
DISK_SIZE="10G"
STORAGE="local-lvm"

This gist is a simple no-brainer description of the 3 ways (actually 2.5) the Web handle events.

<tag onclick />

The declarative inline HTML event listener is mostly an indirection of DOM Level 0 events, meaning this simply uses the equivalent of tag.onclick = listener behind the scene.

Example

click me
@WebReflection
WebReflection / dom-libraries.md
Last active February 24, 2025 11:28
A recap of my FE / DOM related libraries

My FE/DOM Libraries

a gist to recap the current status, also available as library picker!

Minimalistic Libraries

do one thing only and do it well

  • µhtml (HTML/SVG auto-keyed and manual keyed render)
  • augmentor (hooks for anything)
  • wickedElements (custom elements without custom elements ... wait, what?)
@WebReflection
WebReflection / custom-elements-pattern.md
Last active March 26, 2025 23:15
Handy Custom Elements' Patterns

Handy Custom Elements' Patterns

Ricardo Gomez Angel Photo by Ricardo Gomez Angel on Unsplash

This gist is a collection of common patterns I've personally used here and there with Custom Elements.

These patterns are all basic suggestions that could be improved, enriched, readapted, accordingly with your needs.

@ebidel
ebidel / coverage.js
Last active April 27, 2024 04:13
CSS/JS code coverage during lifecycle of page load
Moved to https://github.com/ebidel/puppeteer-examples
@tjstebbing
tjstebbing / whatIReallyReallyWant.md
Last active August 7, 2017 07:14
Atomic client side stores with server sync

At CampJS this week there were a lot of talks about frontend web components, mostly focused on views. It struck me, as a mostly backend engineer that we could do with some better abstractions around client side/server side data sync to go with the new view model systems out there. Here's a few thoughts I had over the weekend..

A client side, in memory data store:

  1. Which is atomic (transactional?)
  2. With data that is strongly typed (validated)
  3. That syncs to a server (which is authoritative)
  4. That syncs uncommitted content to local storage transparently
  5. That is resilient to connectivity trouble
  6. That is bounded by the developer
@WebReflection
WebReflection / base64.js
Last active April 29, 2017 02:44
Quite possibly the smallest base 64 utility out there.
// base64.decode(base64.encode('💩'));
// Browsers
const base64 = {
encode: str => btoa(unescape(encodeURIComponent(str))),
decode: str => decodeURIComponent(escape(atob(str)))
};
/* ES3 compat version
var base64 = {
@srdjan
srdjan / 100+ different counter apps...
Last active May 6, 2024 05:13
100+ different js counter apps...
100+ different js counter apps...

Change node version for current project.

This is a little ZSH function that hooks change cwd and checks for our ./deployment.json it then uses nvm to change the current node version to the one required by the project.

Install deps

  • jq
  • nvm

mdless

Read markdown files in your terminal

cd ~/code
git clone [email protected]:axiros/terminal_markdown_viewer.git
cd terminal_markdown_viewer
pip install markdown pygments pyyaml