Skip to content

Instantly share code, notes, and snippets.

@qoomon
qoomon / conventional_commit_messages.md
Last active April 23, 2024 20:55
Conventional Commit Messages

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs

Commit Message Formats

Default

editText.setCustomInsertionActionModeCallback(new CustomInsertionActionModeCallback());
@nickkraakman
nickkraakman / ffmpeg-cheatsheet.md
Last active April 23, 2024 20:53
FFmpeg cheat sheet for 360 video

FFmpeg Cheat Sheet for 360º video

Brought to you by Headjack

 
FFmpeg is one of the most powerful tools for video transcoding and manipulation, but it's fairly complex and confusing to use. That's why I decided to create this cheat sheet which shows some of the most often used commands.

 
Let's start with some basics:

  • ffmpeg calls the FFmpeg application in the command line window, could also be the full path to the FFmpeg binary or .exe file
@ipisboomz
ipisboomz / ddt-mini-ruler.js
Last active April 23, 2024 20:49
DDTank mini map ruler
var s = document.createElement("link");
s.rel = "stylesheet";
s.type = 'text/css';
s.href = "//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css";
$("head").append(s);
$.getScript('//code.jquery.com/ui/1.12.1/jquery-ui.js', () => {
var lines = [];
@slykar
slykar / docker-compose-hackintosh.md
Last active April 23, 2024 20:49
Docker and Docker Compose on AMD OSX Hackintosh via Docker Machine

Introduction

Docker.app will complain about incompatible processor, so we will use Docker Machine.

Instalation

Download Docker for Mac (Docker.app). It contains some binaries that are necessary.

brew install virtualbox docker-machine
@tazarov
tazarov / test_chunking_chroma.py
Last active April 23, 2024 20:48
An example of how one can chunk texts from large documents in chroma using langchain.
import uuid
from chromadb.utils import embedding_functions
from langchain.schema import Document
from langchain.text_splitter import RecursiveCharacterTextSplitter
long_text = """
The Downsides of LLMs (Logical Language Models)
In the age of artificial intelligence, Logical Language Models (LLMs) represent a significant leap forward in the field of natural language processing. These models are capable of comprehending, generating, and reasoning about human languages in a way that mimics human-like understanding. While the benefits of LLMs are numerous, it's essential to also recognize the downsides that accompany these advancements. This essay will explore the negative aspects of LLMs in terms of ethics, job displacement, security, and potential biases.
AddCSLuaFile()
do -- override type functions
gtype = type
local getmetatable = getmetatable
local rawequal = rawequal
getmetatable("").MetaName = "string"
solver=LAMBDA(grid,
LET(
numbers, SEQUENCE(9),
numgrid, SEQUENCE(9,9,0),
vgrid, TOCOL(grid*1),
pos, XMATCH(0,vgrid)-1,
IF(
ISNA(pos), grid,
LET(
i,INT(pos/9),
@hiaux0
hiaux0 / file-mime-types.ts
Last active April 23, 2024 20:43
Typescript Enum for file mime types
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
enum MimeTypes {
".aac" = "audio/aac",
".abw" = "application/x-abiword",
".arc" = "application/x-freearc",
".avi" = "video/x-msvideo",
".azw" = "application/vnd.amazon.ebook",
".bin" = "application/octet-stream",
".bmp" = "image/bmp",
@tomnomnom
tomnomnom / alert.js
Last active April 23, 2024 20:42
Ways to alert(document.domain)
// How many ways can you alert(document.domain)?
// Comment with more ways and I'll add them :)
// I already know about the JSFuck way, but it's too long to add (:
// Direct invocation
alert(document.domain);
(alert)(document.domain);
al\u0065rt(document.domain);
al\u{65}rt(document.domain);
window['alert'](document.domain);