Skip to content

Instantly share code, notes, and snippets.

@Klerith
Klerith / pasos-node-ts-jest.md
Created August 19, 2023 18:35
Note + TypeScript + Jest = Testing

Pasos para configurar Jest con TypeScript, en Node

Documentación oficial sobre Jest

  1. Instalaciones de desarrollo (super test es útil para probar Express)
npm install -D jest @types/jest ts-jest supertest
@willurd
willurd / web-servers.md
Last active May 7, 2024 04:58
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@jake-b
jake-b / usb_hid_gadget.sh
Created May 7, 2020 14:12
Emulate both a keyboard and mouse using the USB
#!/bin/bash
# References:
# https://www.isticktoit.net/?p=1383
# http://irq5.io/2016/12/22/raspberry-pi-zero-as-multiple-usb-gadgets/
# After running this, use hid_gadget_test.c <https://github.com/aagallag/hid_gadget_test/blob/master/hid_gadget_test.c>
cd /sys/kernel/config/usb_gadget/
@slava-vishnyakov
slava-vishnyakov / readme.md
Last active May 7, 2024 04:49
How to upload images with TipTap editor
  1. Create a file Image.js from the source below (it is almost a copy of Image.js from tiptap-extensions except that it has a constructor that accepts uploadFunc (function to be called with image being uploaded) and additional logic if(upload) { ... } else { ... previous base64 logic .. } in the new Plugin section.
import {Node, Plugin} from 'tiptap'
import {nodeInputRule} from 'tiptap-commands'

/**
 * Matches following attributes in Markdown-typed image: [, alt, src, title]
 *
@smores56
smores56 / weaver-talk.md
Last active May 7, 2024 04:49
Presentation slides for my talk about github.com/smores56/weaver

Weaver

An ergonomic arg parsing library for the Roc programming language.


Table of Contents

  • Introductions
  • Why did I want to make this library?
@MeguminSama
MeguminSama / Discord Experiments.js
Last active May 7, 2024 04:46
Discord Experiments.js
let cache; webpackChunkdiscord_app.push([["wp_isdev_patch"], {}, r => cache=r.c]);
var UserStore = Object.values(cache).find(m => m?.exports?.default?.getUser).exports.default;
var actions = Object.values(UserStore._dispatcher._actionHandlers._dependencyGraph.nodes);
var user = UserStore.getCurrentUser();
actions.find(n => n.name === "ExperimentStore").actionHandler.CONNECTION_OPEN({
type: "CONNECTION_OPEN", user: {flags: user.flags |= 1}, experiments: [],
});
actions.find(n => n.name === "DeveloperExperimentStore").actionHandler.CONNECTION_OPEN();
webpackChunkdiscord_app.pop(); user.flags &= ~1; "done";
@diego3g
diego3g / settings.json
Last active May 7, 2024 04:43
VSCode Settings (Updated)
{
"workbench.startupEditor": "newUntitledFile",
"editor.fontSize": 14,
"editor.lineHeight": 1.8,
"javascript.suggest.autoImports": true,
"javascript.updateImportsOnFileMove.enabled": "always",
"editor.rulers": [80, 120],
"extensions.ignoreRecommendations": true,
"typescript.tsserver.log": "off",
"files.associations": {
Architecture NVIDIA GPU Instance type Instance name Number of GPUs GPU Memory (per GPU) GPU Interconnect (NVLink / PCIe) Thermal
Design Power (TDP) from nvidia-smi
Tensor Cores (mixed-precision) Precision Support CPU Type Nitro based
Ampere A100 P4 p4d.24xlarge 8 40 GB NVLink gen 3 (600 GB/s) 400W Tensor Cores (Gen 3) FP64, FP32, FP16, INT8, BF16, TF32 Intel Xeon Scalable (Cascade Lake) Yes
Ampere A10G G5 g5.xlarge 1 24 GB NA (
@probonopd
probonopd / Wayland.md
Last active May 7, 2024 04:40
Think twice about Wayland. It breaks everything!

Think twice before abandoning Xorg. Wayland breaks everything!

Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.

Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.

Wayland proponents make it seem like Wayland is "the successor" of Xorg, when in fact it is not. It is merely an incompatible alternative, and not even one that has (nor wants to have) feature parity (missing features). And unlike X11 (the X Window System), Wayland protocol designers actively avoid the concept of "windows" (making up incompr

Windows 8 Pro Only Offline Activation RETAIL Keys [Retail Edition Only]:
slmgr.vbs -ipk 4NX96-C2K6G-XFD2G-9X4P9-4JMQH
slmgr.vbs -ipk 4NY9C-Q2VW8-84VH3-YPMDY-FF9T7
slmgr.vbs -ipk 9FN3V-HDGGV-7F8K6-FVT9H-QPBQH
slmgr.vbs -ipk BKBGN-M2HWH-3MRQ6-WTJ9X-KP73H
slmgr.vbs -ipk BP4FX-DNGD9-P3FMR-PYR6Q-T6JXV
slmgr.vbs -ipk C37NF-QYM6Y-BVFCR-WMXGV-QPBQH
slmgr.vbs -ipk 3NM39-QTK29-YGY3C-TJ2BJ-K2BQH
slmgr.vbs -ipk 8B3N2-GWPXP-3VFP2-VX69Q-QRPKV