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, |
| 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 | |
| * |
The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.
This means you have the following choices:
import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.await import(…) from CommonJS instead of require(…).| export function unindent(template: TemplateStringsArray, ...args: any[]): string { | |
| let numSpaces = 999; | |
| for (const part of template) { | |
| for (const indentation of part.match(/\n +/g) || []) { | |
| numSpaces = Math.min(numSpaces, indentation.length - 1); | |
| } | |
| } | |
| const spaces = new RegExp('\n' + ' '.repeat(numSpaces < 999 ? numSpaces : 0), 'g'); | |
| return template |
I tried the WSL and it isn't quite seamless enough for me. I ran in to problems when editing in VSCode and having watchers on my files (ng serve, dotnet watch run, etc.). In addition, I kept running in to problems that only manifest themselves when running in WSL. For example, this issue with doing production builds and the terser plugin has made many a developer rage-quit on using WSL. Just figuring out that it was an issue with the WSL took a lot of time.
That terser plugin issue was never resolved and I ended up having to keep a git bash window open in addition to my WSL console window so I could do production builds. To make matters worse, my npm packages were platform-dependent so I couldn't use the same project folder. So, my procedure was: commit whatever changes to test branch, push to repo, git pull on my "windows" project folder, and do a production build there
| 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 | |
| * |
| import { useRef, useCallback, useEffect } from 'react'; | |
| // A callback that always closes over the latest data but keeps the same | |
| // identity and will not be called after component unmounts | |
| const useStableCallback = callback => { | |
| const callbackRef = useRef(); | |
| const memoCallback = useCallback( | |
| (...args) => callbackRef.current && callbackRef.current(...args), | |
| [], |
| #!/bin/bash | |
| # | |
| # Script to convert MP4 video to GIF with generation of custom color palette. | |
| # | |
| #=== Do not touch code below | |
| # Inner variables | |
| input_file="" | |
| input_fps="20" | |
| input_height="512" |
| user www-data; | |
| worker_processes auto; | |
| worker_rlimit_nofile 8192; | |
| error_log /var/log/nginx/error.log warn; | |
| pid /var/run/nginx.pid; | |
| events { | |
| worker_connections 8000; | |
| } |