Skip to content

Instantly share code, notes, and snippets.

View YumaInaura's full-sized avatar

いなうらゆうま ( 稲浦悠馬 ) YumaInaura

View GitHub Profile
@YumaInaura
YumaInaura / VIMIUM.md
Last active April 21, 2024 22:56
Vimium — Default keymap list used to Custom key mappings ( unmapAll and enable mappings you like )

Vimium — Default keymap list used to Custom key mappings

Shortcuts

# Navigating the page

map j scrollDown
map <c-e> scrollDown
map k scrollUp
@YumaInaura
YumaInaura / VIM.md
Last active April 16, 2024 22:17
Vim — What is the name of "q and colon" mode? ( A. command-line window )

Vim — What is the name of "q and colon" mode? ( A. command line window )

Or named "command window".

I mean "q and colon" ( q: ).

Not "colon and q" means quit vim ( :q ).

image

@YumaInaura
YumaInaura / MAC.md
Last active March 4, 2024 23:55
Mac OS — Edit image in clipboard directly with Preview

Mac OS — Edit image in clipboard directly with Preview

Copy a image to clipboard

For example

Command + Shift + Control to start screen short mode and copy to clipboard.

Example image

@YumaInaura
YumaInaura / PLAYWRIGHT.md
Last active February 22, 2024 17:21
Playwright – select file and send formData
@YumaInaura
YumaInaura / ZSH.md
Last active February 6, 2024 01:46
Zsh — print command examples ( with help document )

Zsh — print command examples ( with help document )

print is zsh law layer command.

For example it probably build zle command behaviour.

If you master it you will get so beautifule zsh style.

Examples

@YumaInaura
YumaInaura / ZSH.md
Last active December 12, 2023 17:34
Zsh / Zle — Bindkey escape sequences ( backspace / escape / carriage return and others )

Zsh / Zle — Bindkey escape sequences ( backspace / escape / carriage return and others )

Popular used keys

\r
carriage return

\e, \E
escape
@YumaInaura
YumaInaura / README.md
Last active November 21, 2023 05:48
Gist — Manage in one repository many gists by using git submodule

Gist — Manage in one repository many gists by using git submodule

Gist is a nice service. We can write code so easily and manage files as repository.

But bad points are …

  • Many repository
  • Gist destributes random hash to perticular gists (repositories).
  • So difficult to find or remember contents as repository.
@YumaInaura
YumaInaura / ZSH.md
Last active November 19, 2023 17:50
Zsh / Zle — Bind Enter key by using "accept-line" zle widget

Zsh / Zle — Bind Enter key by using "accept-line" zle widget

I've thought it is maybe impossible ... but found!

Example

bindkey a accept-line
@YumaInaura
YumaInaura / @ZSH.md
Last active November 16, 2023 00:45
Zsh — autoload First Steps

Zsh — autoload First Steps

What is autoload?

  • Add file in specified directory and enable to use command.
    • Shell function behaves like command.
  • Command name and file name is pair.

Make autoload directory

@YumaInaura
YumaInaura / BASH.md
Last active November 12, 2023 19:07
Bash — split $PATH by colon and for in

Bash — split $PATH by colon and for in

for i in $(echo "$PATH" | sed 's/:/ /g'); do echo $i;  done;
  • Replace colon to space in $PATH
  • Pass to for command space separated $PATH
  • for command ( foo roop ) catches that strings as multiple arguments ( so not quote string )
    • So double quotationed string pattern does not work well because for command get in string one argument. ( e.g "$(echo "$PATH" | sed 's/:/ /g')" )