Add this to your .profile/.bashrc etc:
altdo() {
echo -e '\e[?1049h'; "$@"; echo -e '\e[?1049l';
}
then run altdo man
or altdo less
, altdo top
etc.
{ | |
//Also add a css rule: .minimap.slider-always [ border-left: 1px solid #3b3b3b; ] | |
"workbench.startupEditor": "none", | |
"editor.scrollbar.horizontal": "visible", | |
"editor.scrollbar.vertical": "visible", | |
"editor.mouseWheelScrollSensitivity": 0.25, | |
"editor.stickyScroll.enabled": true, | |
"editor.minimap.showSlider": "always", |
var el = document.querySelector("#__next > div.overflow-hidden.w-full.h-full.relative.flex.z-0 > div.relative.flex.h-full.max-w-full.flex-1.overflow-hidden > div > main > div.absolute.bottom-0.left-0.w-full.border-t.md\\:border-t-0.dark\\:border-white\\/20.md\\:border-transparent.md\\:dark\\:border-transparent.md\\:bg-vert-light-gradient.bg-white.dark\\:bg-gray-800.md\\:\\!bg-transparent.dark\\:md\\:bg-vert-dark-gradient.pt-2 > form > div > div.flex.flex-col.w-full.py-2.flex-grow.md\\:py-3.md\\:pl-4.relative.border.border-black\\/10.bg-white.dark\\:border-gray-900\\/50.dark\\:text-white.dark\\:bg-gray-700.rounded-md.shadow-\\[0_0_10px_rgba\\(0\\,0\\,0\\,0\\.10\\)\\].dark\\:shadow-\\[0_0_15px_rgba\\(0\\,0\\,0\\,0\\.10\\)\\]"); | |
el.style.boxSizing='border-box'; | |
el.style.backgroundColor='#fafafa'; | |
var ta = document.querySelector("#__next > div.overflow-hidden.w-full.h-full.relative.flex.z-0 > div.relative.flex.h-full.max-w-full.flex-1.overflow-hidden > div > main > div.absolute.bottom-0.left-0.w-full.border-t.md |
Add this to your .profile/.bashrc etc:
altdo() {
echo -e '\e[?1049h'; "$@"; echo -e '\e[?1049l';
}
then run altdo man
or altdo less
, altdo top
etc.
Put this in your .bashrc/.profile:
rawcat() { sh -c 'trap "stty icanon" SIGINT; stty -icanon; cat $@;' _ $@; }
rawnc() { sh -c 'trap "stty icanon" SIGINT; stty -icanon; nc $@;' _ $@; }
The trap is used to set cat/nc to icanon state when it is Ctrl+C'd, otherwise it will be stuck in -icanon even if you run the normal /bin/cat, or any program that reads stdin like cat, like hexdump.
When using cat > file
stty would complain, but still works as expected for some unknown reason
see man stty
//Copyleft 2023 hym3242 | |
//No rights reserved | |
//please forgive my bad code | |
//tested pass on FreeBSD 13.2 | |
//inspired by vttest(1) and xterm manual concerning ctrl sequences (https://invisible-island.net/xterm/ctlseqs/ctlseqs.html) | |
//Usage: stty -echo -icanon; stdbuf -o0 ./mouse 2>debug_output.txt | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <signal.h> |
https://www.google.com/chrome/?system=true&standalone=1&platform=win64 | |
https://www.google.com/chrome/?system=true&standalone=1&platform=win | |
https://www.google.com/chrome/?system=true&standalone=1&platform=mac | |
https://google.cn/chrome/?standalone=1&platform=mac | |
https://google.cn/chrome/?standalone=1&platform=win | |
https://google.cn/chrome/?standalone=1&platform=win64 |
$ type rawcatv
rawcatv is a function
rawcatv ()
{
sh -c 'trap "stty icanon" SIGINT; stty -icanon; cat -v $@;' _ $@
}
$ # plz forgive this dumb method of visualization. | |
$ cp /System/Library/Frameworks/AppKit.framework/Resources/StandardKeyBinding.dict . | |
$ plutil -convert xml1 StandardKeyBinding.dict | |
$ plutil -p StandardKeyBinding.dict | unicode-vis | cat -v | tr '\t' '+' | |
{ | |
"^C" => "insertNewline:" | |
"^H" => "deleteBackward:" | |
"^Y" => "insertBacktab:" //shift+tab | |
"^[" => "cancelOperation:" | |
"^?" => "deleteBackward:" |
0x000000000041e50d ( 0x205) -[NSTextView(NSKeyBindingCommands) insertTab:] [FUNC, OBJC, NameNList, MangledNameNList, Merged, NList, FunctionStarts] | |
0x000000000046d4ee ( 0x22d) -[NSTextView(NSKeyBindingCommands) insertNewline:] [FUNC, OBJC, NameNList, MangledNameNList, Merged, NList, FunctionStarts] | |
0x000000000046e21a ( 0x35a) -[NSTextView(NSKeyBindingCommands) deleteBackward:] [FUNC, OBJC, NameNList, MangledNameNList, Merged, NList, FunctionStarts] | |
0x000000000046e574 ( 0x358) -[NSTextView(NSKeyBindingCommands) _checkInList:listStart:markerRange:emptyItem:atEnd:inBlock:blockStart:forCharacterRange:] [FUNC, OBJC, NameNList, MangledNameNList, Merged, NList, FunctionStarts] | |
0x0000000000471d20 ( 0x9e) -[NSTextView(NSKeyBindingCommands) deleteWordBackward:] [FUNC, OBJC, NameNList, MangledNameNList, Merged, NList, FunctionStarts] | |
0x000000000084cf2c ( 0xe5) -[NSTextView(NSKeyBindingCommands) _verticalDistanceForPageScroll] [FUNC, OBJC, NameNList, MangledNameNList, Merged, NList, FunctionStarts] | |
0x |