Skip to content

Instantly share code, notes, and snippets.

View haxfn's full-sized avatar

Vishal haxfn

View GitHub Profile
@rofrol
rofrol / #macos_tips.md
Last active February 28, 2026 06:42
tips for a lifetime windows user switching to mac
  1. Two-finger click on touch pad is right-click. Or ctrl+touch pad or ctrl+mouse click.
  2. To have switching with alt+tab and window previews, install brew install --cask alt-tab. You may need to change in settings alt+tab to Show windows from applications: All apps. I also like to hide all app windows (cmd+h) or minimize one app window (cmd+m) and have AltTab do now show them. For that change in AltTab > Settings > Controls > Show minimized windows: Hide, Show hidden windows: Hide. Sometimes AltTab does now show preview for some window. In that case reopen AltTab.
  3. To have fast switching between full screen windows: don't full screen and just auto hide top bar instead: System Settings > Control Center > Automatically hide and show the menu bar: Always. Also System Settings > Wallpaper > Colors: black or set image with black at the top. You may also auto hide dock. One downside if you move mouse to top bar and click to fast, you will show desktop instead. There is some possibility for fast swi

NOTE: This was first authored on 26 Feb 2014. Things may have changed since then.

C++'s Templates

C++'s templates could be seen as forming a duck typed, purely functional code generation program that is run at compile time. Types are not checked at the initial invocation stage, rather the template continues to expand until it is either successful, or runs into an operation that is not supported by that specific type – in that case the compiler spits out a 'stack trace' of the state of the template expansion.

To see this in action, lets look at a very simple example:

template