Skip to content

Instantly share code, notes, and snippets.

@sindresorhus
sindresorhus / esm-package.md
Last active May 13, 2024 08:32
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@dianjuar
dianjuar / i3-shortcuts-screenshot.md
Last active May 13, 2024 08:32
My i3 shortcuts to take screenshots

Requirements

  • maim
  • xclip

Set-up

Set this on your i3 config file ~/.i3/config

# Screenshots
#
# Reply to Weissman 2024
#
# Code to draw the spatial locations of market-linked infections and
# secondary++ infections, and estimate median distance to the market (origin)
#
# Initializations ####
@Artefact2
Artefact2 / README.md
Last active May 13, 2024 08:30
GGUF quantizations overview

Which GGUF is right for me? (Opinionated)

Good question! I am collecting human data on how quantization affects outputs. See here for more information: ggerganov/llama.cpp#5962

In the meantime, use the largest that fully fits in your GPU. If you can comfortably fit Q4_K_S, try using a model with more parameters.

llama.cpp feature matrix

See the wiki upstream: https://github.com/ggerganov/llama.cpp/wiki/Feature-matrix

@torcado194
torcado194 / cleanEdge-shadertoy.glsl
Last active May 13, 2024 08:29
cleanEdge, a pixel art upscaling algorithm for clean rotations
/*** MIT LICENSE
Copyright (c) 2022 torcado
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
@rise-worlds
rise-worlds / For Mac 4.2.6 unlimited trial.md
Last active May 13, 2024 08:28 — forked from satish-setty/trial.md
Beyond Compare 4 license for Windows, Mac, Linux

for 4.2.4 or higher, 4.2.5,4.2.6,4.3.7, it's works, this is the way which makes Always in evaluation mode.

  1. open Terminal, go to the dir : cd /Applications/Beyond Compare.app/Contents/MacOS
  2. change the name BCompare to BCompare.bak: mv BCompare BCompare.bak
  3. touch a file name BCompare , and chmod a+ux BCompare : touch BCompare && chmod a+ux BCompare
  4. open BCompare with text editor, insert the script :
#!/bin/bash
rm "/Users/$(whoami)/Library/Application Support/Beyond Compare/registry.dat"
"`dirname "$0"`"/BCompare.bak $@
@dasdo
dasdo / GIT.md
Last active May 13, 2024 08:26
Lista de Comandos en GIT

Configuración Básica

Configurar Nombre que salen en los commits

	git config --global user.name "dasdo"

Configurar Email

	git config --global user.email dasdo1@gmail.com
@RickCogley
RickCogley / create-github-issue.sh
Last active May 13, 2024 08:23
Curl Script to Create a Github Issue
curl -X "POST" "https://api.github.com/repos/rickcogley/REPONAME/issues?state=all" \
-H "Cookie: logged_in=no" \
-H "Authorization: token THEd13GITHUBfb87TOKENa4FROM5eSETTINGS" \
-H "Content-Type: text/plain; charset=utf-8" \
-d $'{
"title": "A workflow alerts Operator who performs a process",
"body": "TBD",
"milestone": 5,
"assignees": [
"RickCogley",
@jfsiii
jfsiii / relativeLuminanceW3C.js
Last active May 13, 2024 08:23
Calculate the relative luminance, or brightness, of a color. Accepts values 0-255 for R, G, B.
// from http://www.w3.org/TR/WCAG20/#relativeluminancedef
function relativeLuminanceW3C(R8bit, G8bit, B8bit) {
var RsRGB = R8bit/255;
var GsRGB = G8bit/255;
var BsRGB = B8bit/255;
var R = (RsRGB <= 0.03928) ? RsRGB/12.92 : Math.pow((RsRGB+0.055)/1.055, 2.4);
var G = (GsRGB <= 0.03928) ? GsRGB/12.92 : Math.pow((GsRGB+0.055)/1.055, 2.4);
var B = (BsRGB <= 0.03928) ? BsRGB/12.92 : Math.pow((BsRGB+0.055)/1.055, 2.4);
@rponte
rponte / using-uuid-as-pk.md
Last active May 13, 2024 08:21
Não use UUID como PK nas tabelas do seu banco de dados

Pretende usar UUID como PK em vez de Int/BigInt no seu banco de dados? Pense novamente...

TL;TD

Não use UUID como PK nas tabelas do seu banco de dados.

Um pouco mais de detalhes