Skip to content

Instantly share code, notes, and snippets.

View vsuharnikov's full-sized avatar

Vyatcheslav Suharnikov vsuharnikov

View GitHub Profile
@vsuharnikov
vsuharnikov / macos-assign-to-desktop-from-terminal.md
Created June 9, 2024 08:33 — forked from 0xdevalias/macos-assign-to-desktop-from-terminal.md
The following shows how you can tell macOS to assign an application to always show on all desktops, one specific desktop, or to unbind it.

macOS - Setting 'Assign to Desktop' via Terminal

The following shows how you can tell macOS to assign an application to show on one specific desktop, all desktops, or just a single desktop.

Show Current Config

⇒ defaults read com.apple.spaces app-bindings
@vsuharnikov
vsuharnikov / vim_crash_course.md
Created December 29, 2021 08:43 — forked from dmsul/vim_crash_course.md
Vim Crash Course

NOTE: Specific examples given for options, flags, commands variations, etc., are not comprehensive.

NORMAL MODE

Vim has 2 main "modes", that chance the behavior of all your keys. The default mode of Vim is Normal Mode and is mostly used for moving the cursor and navigating the current file.

Some important (or longer) commands begin with ":" and you will see the text you enter next at the bottom left of the screen.

:q[uit] - quit (the current window of) Vim. ("Window" here is internal to Vim, not if you have multiple OS-level windows of Vim open at once.)
:q! - force quit (if the current buffer has been changed since the last save)
:e[dit] {filename} - read file {filename} into a new buffer.

Scala for comprehension translation helper

"For comprehension" is a another syntax to use map, flatMap and withFilter (or filter) methods.

yield keyword is used to aggregate values in the resulting structure.

This composition can be used on any type implementing this methods, like List, Option, Future...

Try it yourself!