Skip to content

Instantly share code, notes, and snippets.

@Klerith
Klerith / ProductForm.tsx
Created November 27, 2023 17:59
Formulario para actualizar un producto
"use client";
import { Product } from "@/interfaces";
interface Props {
product: Product;
}
const sizes = ["XS", "S", "M", "L", "XL", "XXL"];
@kennypete
kennypete / navigating_the_modes_of_Vim.md
Created April 18, 2024 20:46
Navigating the modes of Vim

Navigating the modes of Vim

This diagram illustrates navigating through Vim’s modes. It was built factoring Vim 9 (i.e., all its modes, including up to two new modes, cr and cvr, in November 2023). Information about the state() and 'showmode' is provided too.

SVG version

Some features are only available in the SVG version. It is not provided directly from within this gist’s files because SVGs do not always play nicely in GitHub (particularly, refusing to display embedded fonts).

The SVG version includes hover text help, which shows pertinent information about the underlying key, command, mode, etc.

@tienthanh2509
tienthanh2509 / run.sh
Created August 12, 2023 16:22
Termux SSHD for root user
export PATH=/data/data/com.termux/files/usr/bin:$PATH
sshd \
-D -dd \
-p 2222 -e
@pesterhazy
pesterhazy / building-sync-systems.md
Last active May 10, 2024 22:12
Building an offline realtime sync engine

So you want to write a sync system for a web app with offline and realtime support? Good luck. You might find the following resources useful.

Overview articles

@kyo-takano
kyo-takano / making-the-most-of-local-llms.ipynb
Last active May 12, 2024 07:57
making-the-most-of-local-llms.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@OrionReed
OrionReed / dom3d.js
Last active May 12, 2024 07:56
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@letsautomatenet
letsautomatenet / esphome_install.sh
Last active May 12, 2024 07:53
ESPHome Install - Ubuntu
#!/bin/bash
# If you're having difficulty running this file then ensure the file has execute permissions
# chmod 755 esphome_install.sh
# To run the script type:
# sudo ./esphome_install.sh
### START - Install Docker ###
# Remove any old docker files
@jhaddix
jhaddix / Github bash generated search links (from hunter.sh)
Created January 12, 2020 19:55
Github bash generated search links (from hunter.sh)
@KRostyslav
KRostyslav / tsconfig.json
Last active May 12, 2024 07:43
tsconfig.json с комментариями.
// Файл "tsconfig.json":
// - устанавливает корневой каталог проекта TypeScript;
// - выполняет настройку параметров компиляции;
// - устанавливает файлы проекта.
// Присутствие файла "tsconfig.json" в папке указывает TypeScript, что это корневая папка проекта.
// Внутри "tsconfig.json" указываются настройки компилятора TypeScript и корневые файлы проекта.
// Программа компилятора "tsc" ищет файл "tsconfig.json" сначала в папке, где она расположена, затем поднимается выше и ищет в родительских папках согласно их вложенности друг в друга.
// Команда "tsc --project C:\path\to\my\project\folder" берет файл "tsconfig.json" из папки, расположенной по данному пути.
// Файл "tsconfig.json" может быть полностью пустым, тогда компилятор скомпилирует все файлы с настройками заданными по умолчанию.
// Опции компилятора, перечисленные в командной строке перезаписывают собой опции, заданные в файле "tsconfig.json".