Skip to content

Instantly share code, notes, and snippets.

@rektide
rektide / seam-carving-content-aware-image-resizing.md
Created July 29, 2026 02:34
Seam Carving: Content-Aware Image Resizing

Seam Carving for Content-Aware Image Resizing

Shai Avidan
Mitsubishi Electric Research Labs

Ariel Shamir
The Interdisciplinary Center & MERL

Transcription note: This is a clean Markdown transcription of the supplied PDF. Repeated journal headers and footers are omitted. Figures are represented by their original captions, and equations are rendered in LaTeX.

{
"did": "did:plc:zjbq26wybii5ojoypkso2mso"
}
@rektide
rektide / ASYNC.md
Last active January 29, 2026 10:53
plenary-cheatsheet

Plenary Async System: Deep Dive

Overview

Plenary's async system (plenary.async) is a coroutine-based async framework built on top of Neovim's libuv event loop. It converts traditional callback-style Node.js patterns into Lua coroutines, allowing you to write async code that looks synchronous.

Core Concept: plenary.async.async

The async.async module provides fundamental building blocks:

#!/usr/bin/env node
function* gen(
m = Number.parseInt(process.argv[2]) || 15,
n = Number.parseInt(process.argv[3]) || 26,
data = 0
) {
// finish iteration
if (n-- === 0) {
if (m === 0)
libGLX_mesa.so.0 libglx-mesa0
MesaGLInteropGLXExportObject@Base 12.0.4
MesaGLInteropGLXFlushObjects@Base 23.3.0~
MesaGLInteropGLXQueryDeviceInfo@Base 12.0.4
__glx_Main@Base 17.0.0~
glAreTexturesResidentEXT@Base 0
glDeleteTexture
@rektide
rektide / index.html
Last active August 23, 2022 18:46
Unique-ify: In Place or At Finish (http://jsbench.github.io/#bdd6c20c07e440f32d567c59ad4f5e9a) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Unique-ify: In Place or At Finish</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@rektide
rektide / hn-domain-filter.user.js
Created June 30, 2021 21:41
Filter HN rows by domain
// ==UserScript==
// @name Url Filterer
// @namespace Violentmonkey Scripts
// @match https://news.ycombinator.com/*
// @grant none
// @version 1.0
// @author -
// @description 6/30/2021, 5:27:00 PM
// ==/UserScript==
const BANNED = [
arm-openwrt-linux-muslgnueabi-gcc -Os -pipe -o /usr/local/src/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/node-v12.19.0/out/Release/obj.target/uvwasi/deps/uvwasi/src/uvwasi.o ../deps/uvwasi/src/uvwasi.c '-DV8_DEPRECATION_WAR
NINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D__STDC_FORMAT_MACROS' '-D_GNU_SOURCE' '-D_POSIX_C_SOURCE=200112' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' -I/usr/local/src/openwrt/staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/usr/
include -I../deps/uvwasi/include -I../deps/uv/include -pthread -Wall -Wextra -Wno-unused-parameter -fvisibility=hidden -O3 -fno-omit-frame-pointer -MMD -MF /usr/local/src/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/node-v12.
19.0/out/Release/.deps//usr/local/src/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/node-v12.19.0/out/Release/obj.target/uvwasi/deps/uvwasi/src/uvwasi.o.d.raw -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unuse
d-but-set-variable -Wno-error=unused-result -mfl
@rektide
rektide / gstreamer-err.log
Last active October 17, 2020 16:52
openwrt make log
Installing /mnt/keepstar/exkay/src/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/gst-plugins-base-1.18.0/openwrt-build/po/uk.gmo to /mnt/keepstar/exkay/src/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/gst-plugins-base-1.18.0/ipkg-install/usr/share/locale/uk/LC_MESSAGES/gst-plugins-base-1.0.mo
Installing /mnt/keepstar/exkay/src/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/gst-plugins-base-1.18.0/openwrt-build/po/vi.gmo to /mnt/keepstar/exkay/src/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/gst-plugins-base-1.18.0/ipkg-install/usr/share/locale/vi/LC_MESSAGES/gst-plugins-base-1.0.mo
Installing /mnt/keepstar/exkay/src/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/gst-plugins-base-1.18.0/openwrt-build/po/zh_CN.gmo to /mnt/keepstar/exkay/src/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/gst-plugins-base-1.18.0/ipkg-install/usr/share/locale/zh_CN/LC_MESSAGES/gst-plugins-base-1.0.mo
Installing /mnt/keepstar/exkay/src/openwrt
@rektide
rektide / return-passed-through.js
Last active June 26, 2020 18:35
Does calling return on a generator call return on what it's iterating?
// test for https://mobile.twitter.com/RangerMauve/status/1276579544766578688
var fn = {
[Symbol.asyncIterator]: function(){return fn},
next: async function(){
console.log("iterating")
return { value: 42, done : false }
},
return: function(){
console.log("return")