To compile and run via CLI:
g++ program.cpp -o program # compiles program.cpp → program
./program # runs the executableAlternative:
g++ % -o program && ./program # % = current file
:!g++ % -o program && ./program # run directly in vim (! runs in shell)
``
## Ollama
```bash
curl -fsSL https://ollama.com/install.sh | sh
ollama run deepseek-r1:1.5bsudo nano /etc/default/grubFind and update this line (usually at 5–6th line):
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=video acpi_osi=! acpi_osi='Windows 2015'"Then update GRUB:
sudo grub-mkconfig -o /boot/grub/grub.cfgsudo systemctl enable bluetooth.service
sudo systemctl start bluetooth.servicesudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
sudo systemctl restart systemd-resolved
sudo bash -c 'echo -e "[Resolve]\nDNS=1.1.1.1 8.8.8.8\nFallbackDNS=1.0.0.1 8.8.4.4" > /etc/systemd/resolved.conf.d/dns.conf'
sudo systemctl restart systemd-resolvedsudo pacman -S fish
chsh -s /usr/bin/fish
fish_config # to change themes
nano ~/.config/fish/config.fish
# set fish_greeting "" <-- Add this line to disable welcome messageNavigate to ~/.config/kwalletrc & replace it's contents with,
[Wallet]
“Enabled=false”| Command | Description |
|---|---|
ps |
Show running processes. |
ps aux |
Detailed list of all processes. |
ps -ef |
Another common full-format listing. |
top |
Real-time process viewer. |
htop |
Enhanced interactive process viewer (sudo pacman -S htop). |
atop |
Advanced system and process monitor (sudo pacman -S atop). |
pgrep <name> |
Find PID(s) of processes by name. |
pidof <program> |
Get PID of a program. |
pstree |
Show processes in a tree structure. |
kill <PID> |
Terminate a process. |
btop |
Cool task manager. |
fzf |
Search from CLI. |
neofetch |
Display system specifications in a nice way. |
ls / lsd |
Display available content (ls ./ to search). |
ffmpeg |
Edit/convert video files. |
tldr |
Better version of --help. Example: tldr ffmpeg. |
- Shift + PrtSc → Screenshot
- Alt + Tab → Switch windows
- Ctrl + Tab → Switch browser tabs
leetcode/* # ignore everything inside leetcode/
!leetcode/*.cpp # but don't ignore .cpp files
!leetcode/*.h # but don't ignore .h filesThink of it as a priority system:
- First rule ignores everything in
leetcode/ - Later
!rules bring back.cppand.h
Syntax notes:
#→ comments*→ wildcard (like shell globbing)!→ negation (keep files even if ignored earlier)/→ path separator
Closest to Unix shell globbing, but Git-specific.
git restore <nameOfFile>this functions restores the specified file to it's last commit
mv old.py new.py # rename file
rm new.cpp # delete file
nmtui # GUI Wi-Fi setupShortcuts:
- Super + Q → New Terminal
- Super + C → Close Terminal
- Super + M → Exit Hyprland
- Super + R → Search
python3 -m venv <nameOfVenv>
# Activate the virtual environment
source <nameOfVenv>/bin/activate # (bash/zsh)
source venv/bin/activate.fish # (fish)
<nameOfVenv>\Scripts\activate.bat # (cmd)
<nameOfVenv>\Scripts\Activate.ps1 # (powershell)
# Deactivate the virtual environment
deactivate# Output the list of installed packages
pip freeze
# Write the list of installed packages to a file
pip freeze > requirements.text
# Install the packages listed in the requirements.txt file
pip install -r requirements.txt:%y+ " Select all + copy to clipboard
vim ~/.vimrc " Open vim config
source ~/.vimrc " Reload config instantly- ctrl+Space-bar -> intelliSense suggestions
- alt+mouseClick -> multi-cursor functionality
# Open following file
code "C:\Users\<User_Name>\AppData\Local\Programs\Microsoft VS Code\<commit_hash>\resources\app\out\vs\workbench\workbench.desktop.main.css"
# search: '.window-appicon'
# choose the first one you had searched, change the value: 'width:35px;' to 'width:0px;' -
Character Map
-
Terminal setups:
notepad $PROFILE Get-ChildItem $env:POSH_THEMES_PATH
git tag -a tagName -m "message here"
git push --tagsUsed ohmyposh to get custom powerlines created my own theme, can be used by running
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\mytheme.omp.json" | Invoke-Expression Can be set as default by pasting above line in notepad $PROFILE
- Lowercase everything
- Spaces →
- - Remove special characters (so
C++→#c,Endeavor OS→#endeavor-os)
This works natively on GitHub, Obsidian, VS Code preview, and most markdown renderers.