Skip to content

Instantly share code, notes, and snippets.

View servatj's full-sized avatar
🏠
Working from home

Josep Servat servatj

🏠
Working from home
View GitHub Profile
@servatj
servatj / iterm2.md
Created November 11, 2022 06:19 — forked from squarism/iterm2.md
An iTerm2 Cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
/*
Búsqueda binaria (Binary Search): Implementación de ejemplo.
Recibe un array ordenado y el elemento a buscar. Si encuentra el elemento
devolverá el índice del elemento encontrado, si no se encuentra devolverá `-1`.
*/
function binarySearch(array, item) {

Screen Quick Reference

Basic

Description Command
Start a new session with session name screen -S <session_name>
List running sessions / screens screen -ls
Attach to a running session screen -x
Attach to a running session with name screen -r