Skip to content

Instantly share code, notes, and snippets.

@VictorTaelin
VictorTaelin / gpt4_abbreviations.md
Last active December 13, 2025 10:50
Notes on the GPT-4 abbreviations tweet

Notes on this tweet.

  • The screenshots were taken on different sessions.

  • The entire sessions are included on the screenshots.

  • I lost the original prompts, so I had to reconstruct them, and still managed to reproduce.

  • The "compressed" version is actually longer! Emojis and abbreviations use more tokens than common words.

@quentinms
quentinms / caddy-config.json
Created April 11, 2022 14:31
Running LanguageTool locally
{
"apps": {
"http": {
"servers": {
"localhost": {
"listen": [
":9081"
],
"automatic_https": {
"disable_redirects": true
@cryptaliagy
cryptaliagy / GoLinks tutorial.md
Last active December 1, 2022 22:12
A tutorial for how to install golinks locally. Check out the repository at https://github.com/taliamax/golinks
@wesslen
wesslen / Dockerfile
Last active March 30, 2025 06:13
streamlit-spacy-docker-container
FROM python:3.7
EXPOSE 8501
WORKDIR /app
COPY requirements.txt ./requirements.txt
RUN pip3 install -r requirements.txt
COPY . .
CMD streamlit run app.py
@DusanBrejka
DusanBrejka / fluent-ffmpeg-custom-args.js
Last active September 21, 2023 06:45
node-fluent-ffmpeg - Execute Custom FFMPEG arguments hack
/*
As at the time of writing this Fluent ffmpeg-API for node.js has not been updated
for years and still does not support custom FFMPEG attributes, the only solutions
are either forking it or resorting to hacks like this one...
Please use it only when fluent does not support more complex arguments
(like generating multi-rendition HLS with all playlists in a single command)
NOTE: this does not support 'progress' event, but you can do it easily by
parsing 'stderr' event with extractProgress method from fluent-ffmpeg/lib/options.js
@odbol
odbol / json_lines.js
Created August 27, 2019 04:42
Parse JSON Lines file in the browser with Javascript. http://jsonlines.org/
function parseJsonLines(file) {
let results = [];
for (let i = 0; i < file.length;) {
const end = file.indexOf('\n', i);
if (end < 0) {
end = file.length;
}
const currentLine = file.substring(i, end);
@mayneyao
mayneyao / notion2blog.js
Last active February 9, 2026 03:46
Notion.so > Personal Blog | custom domain + disqus comment
const MY_DOMAIN = "agodrich.com"
const START_PAGE = "https://www.notion.so/gatsby-starter-notion-2c5e3d685aa341088d4cd8daca52fcc2"
const DISQUS_SHORTNAME = "agodrich"
addEventListener('fetch', event => {
event.respondWith(fetchAndApply(event.request))
})
const corsHeaders = {
"Access-Control-Allow-Origin": "*",
@hinchliff
hinchliff / c7n_run.py
Created April 19, 2019 12:31
Run a Cloud Custodian policy file from a Python script. Most useful perhaps to be able to run Cloud Custodian from AWS Lambda.
import os
import logging
from c7n.commands import run
from c7n.config import Config
logger = logging.getLogger()
logger.setLevel(logging.INFO)
# Capture our current directory
THIS_DIR = os.path.dirname(os.path.abspath(__file__))
@Hegemege
Hegemege / hue_shift.py
Last active June 22, 2024 09:53
OBS Hue Shift over Time
# How to use this script in OBS:
# You need Python 3.6 installed
# 1. Open OBS > Tools > Scripts
# 2. Copypaste the Python 3.6 install directory into Python Settings tab.
# 3. Download this file onto your computer and put it somewhere safe
# 4. Add the script to the list of Loaded Scripts by clicking the + at the bottom left
# 5. Select the script from the list and select the correct output source you want to apply the effect to.
# If you can't find the correct source, scroll to the bottom of the file to see if your source is filtered out
# The source you selected must have a Color Correction filter, that has been renamed to "Hue Shift".
# The script won't work otherwise. I couldn't figure out how to list all the filters in a dropdown because
@devdbrandy
devdbrandy / app.js
Created December 5, 2018 18:58
Simple Express API
/* eslint-disable */
const express = require('express');
const app = express();
app.use(express.json());
const db = {
users: [