Skip to content

Latest commit

 

History

History
61 lines (45 loc) · 2.28 KB

File metadata and controls

61 lines (45 loc) · 2.28 KB

💡 Useful Tech Hacks & Shortcuts

A collection of practical, safe and time-saving tech hacks for everyday dev and power-user workflows.
Use these to speed up development, troubleshoot faster and work smarter.

1. Quick local server for any folder

If you need to preview static HTML/CSS fast:

  • Python 3: python -m http.server 8000
  • Node (http-server): npx http-server -p 8000 Then open http://localhost:8000.

2. Search command history

Reuse previous terminal commands quickly:

  • Bash/zsh: press Ctrl + R and start typing to reverse-search history.

3. Open files in VS Code from terminal

From any folder:
code . — opens current folder in VS Code (install code CLI from VS Code if needed).

4. Create a temporary password-protected zip

Quickly archive files with a password (zip must support encryption on your system):

  • zip -e secret.zip file1 file2

5. Save browser tab list

To keep a list of open tabs:

  • Bookmark all tabs into a folder, or use Right click tab → Bookmark all tabs.

6. Take a full-page screenshot (browser)

  • In Chrome: Ctrl+Shift+ICtrl+Shift+P → type Capture full size screenshot.

7. Fast file search across project

  • ripgrep (rg): rg "search_term" --hidden — super fast search in code repositories.
  • On Windows, use PowerShell: Select-String -Path * -Pattern "search_term" -Recurse

8. Inline code notes (TODOs)

Add TODOs with consistent tags and search them:

  • Example: // TODO: fix edge case
  • Then search TODO: across repo to generate quick task list.

9. Speed up large Git diffs

Hide whitespace-only changes:
git diff -w or git show -w <commit>.

10. Clipboard from terminal

Copy output directly to clipboard:

  • macOS: some_command | pbcopy
  • Linux (with xclip): some_command | xclip -selection clipboard
  • Windows PowerShell: some_command | Set-Clipboard

11. Resize images in bulk (for web)

Using ImageMagick:
mogrify -resize 1024x1024\> *.jpg — resizes images keeping aspect ratio, only if larger.

12. Quick network debug

Ping and trace route:

  • ping example.com
  • traceroute example.com (or tracert on Windows)

Use responsibly: these hacks are meant for productivity and harmless troubleshooting. Avoid using them in ways that violate rules, privacy, or security policies.