Skip to content

Instantly share code, notes, and snippets.

@wilmoore
Last active May 21, 2024 19:32
Show Gist options
  • Save wilmoore/753b22b648206e01bdea90567f6bf6ac to your computer and use it in GitHub Desktop.
Save wilmoore/753b22b648206e01bdea90567f6bf6ac to your computer and use it in GitHub Desktop.
Software Engineering :: Guides :: Everyday Dev

Software Engineering :: Guides :: Everyday Dev

⪼ Made with 💜 by realpolyglot.com

related

Vim, Quick Terminal Session, then Back to Vim (i.e. CTRL+z, fg)

Let's say your're in vim and you need to get to you

Fully Qualified Path

Lets say your co-worker passes you a copy of their .env file for your own use. You'll almost always have to contend with changing their machine's IP address to your own, and, if there are any fully qualified paths in the file, you'll have to change those to your own equivalent.

For resolving fully qualified paths, you can use the file command:

⪼ file ~/Documents/blah/blah/blah/certificates/public/service.crt.pub

Ngrok

Get Your Machine's Public IP Address

⪼ curl -s ident.me

Vim Replace

Replace an IP address in Vim

SHIFT+:
:%s/OLD IP ADDRESS/NEW IP ADDRESS/g

remember to escape the dots (.) in the regular expression pattern (the replacement doesn't need to be escaped as it is fixed text and not a pattern)

SHIFT+:
:%s/192\.168\.1\.1/71.33.134.19/g

macOS

Alfred Shortcuts

  • option+spacebar: activate alfred

Keyboard Shortcuts

Window Commands
  • command+n: Open New Window
  • command+w: Close Current Window (if closing last open tab)
  • command+shift+w: Close Current Window (even if there are multiple tabs open)
Tab Control & Navigation
  • command+shift+{: Switch To Previous Tab (Left)
  • command+shift+}: Switch To Next Tab (Right)
  • command+w: Close Current Tab (closes current window if closing last open tab)
  • command+t: Open New Tab

Spotlight

  • command+spacebar: activate spotlight
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment