Because when all you have is a JSON hammer, everything looks like a JSON nail.
$ json=$(tmux display-message -p $(<tmux-json-format.txt));
$ your-program-that-needs-json <<<"$json"| { | |
| // go away copilot and other ai slop machines | |
| "accessibility.verboseChatProgressUpdates": false, | |
| "accessibility.verbosity.inlineChat": false, | |
| "accessibility.verbosity.panelChat": false, | |
| "accessibility.verbosity.terminalChatOutput": false, | |
| "ansible.lightspeed.suggestions.waitWindow": 360000, | |
| "chat.agent.codeBlockProgress": false, | |
| "chat.agent.enabled": false, | |
| "chat.agent.maxRequests": 0, |
| #!/usr/bin/perl | |
| use strict; | |
| my $action = ''; | |
| my $filename = '-'; | |
| for my $arg (@ARGV){ | |
| if ($arg eq "-e" or $arg eq "--export"){ | |
| $action = 'export'; |
| import { useIsInStrictMode } from './useIsInStrictMode'; | |
| test('detect strict mode', async () => { | |
| function TestComponent() { | |
| const [isInStrictMode, CheckStrictMode] = useIsInStrictMode(); | |
| return ( | |
| <p> | |
| <CheckStrictMode /> | |
| {`Strict mode: ${isInStrictMode ? 'on' : 'off'}`} |
| /** | |
| * Helper to test how alpha-transparent colors are layered in the browser. | |
| * | |
| * @example | |
| * blendColors('255 0 0 / 20%', '60 60 40 / 30%', '128 96 44 / 60%') | |
| * // -> {r: 128, g: 84, b: 40, a: 0.7764705882352941} | |
| */ | |
| function overlayColors(...colors) { | |
| let canvas; | |
| if (typeof OffscreenCanvas === 'function') { |
| import * as React from "react"; | |
| // see: https://stackoverflow.com/questions/55045566/react-hooks-usecallback-causes-child-to-re-render/55047178 | |
| /** | |
| * Useful when you when to pass a function that depends on a piece of state, | |
| * as a prop, without triggering a re-render everytime. | |
| * | |
| * @example | |
| * |
| function checkAdblockerEnabled() { | |
| const div = document.createElement('div'); | |
| div.className = 'ad_container'; | |
| const style = document.createElement('style'); | |
| style.innerText = `.ad_container { width:500px; }`; | |
| document.head.appendChild(style); | |
| document.body.appendChild(div); | |
| const hasAdblock = div.offsetWidth < 500; | |
| document.head.removeChild(style); | |
| document.body.removeChild(div); |
| convert -density 256x256 -background transparent favicon.svg -define icon:auto-resize -colors 256 favicon.ico |