Skip to content

Instantly share code, notes, and snippets.

View rodhash's full-sized avatar
:octocat:
💬

Rodrigo Hashimoto rodhash

:octocat:
💬
  • IBM ➜ Kyndryl
  • Taubaté (where strange things happen), SP, Brazil
  • 23:58 (UTC -03:00)
View GitHub Profile
@rodhash
rodhash / imgcat
Created April 26, 2025 05:38 — forked from krtx/imgcat
fix imgcat to be able to display images on tmux https://gitlab.com/gnachman/iterm2/issues/3898#note_14097715
#!/bin/bash
# tmux requires unrecognized OSC sequences to be wrapped with DCS tmux;
# <sequence> ST, and for all ESCs in <sequence> to be replaced with ESC ESC. It
# only accepts ESC backslash for ST.
function print_osc() {
if [[ -n $TERM ]] ; then
printf "\033Ptmux;\033\033]"
else
printf "\033]"
tasks:
- name: Download new file
get_url:
url: "{{ item.url }}"
dest: "{{ schema_dir }}/{{ filename }}.new"
mode: '0644'
local utils = require("oklch-color-picker.utils")
local downloader = require("oklch-color-picker.downloader")
local find, sub, format = string.find, string.sub, string.format
local insert = table.insert
local pow, min, max, floor = math.pow, math.min, math.max, math.floor
local rshift, band, lshift, bor = bit.rshift, bit.band, bit.lshift, bit.bor
local nvim_buf_clear_namespace, nvim_buf_del_extmark, nvim_buf_set_extmark, nvim_set_hl, nvim_buf_get_extmarks =
vim.api.nvim_buf_clear_namespace,
vim.api.nvim_buf_del_extmark,
local utils = require("oklch-color-picker.utils")
local downloader = require("oklch-color-picker.downloader")
local ra = require("oklch-color-picker.reusable_array")
local ra_new, ra_push, ra_clear = ra.new, ra.push, ra.clear
local find, sub, format = string.find, string.sub, string.format
local insert = table.insert
local pow, min, max, floor = math.pow, math.min, math.max, math.floor
local rshift, band, lshift, bor = bit.rshift, bit.band, bit.lshift, bit.bor
local nvim_buf_clear_namespace, nvim_buf_del_extmark, nvim_buf_set_extmark, nvim_set_hl, nvim_buf_get_extmarks =