Skip to content

Instantly share code, notes, and snippets.

View echo-dave's full-sized avatar

Dave May echo-dave

View GitHub Profile
@echo-dave
echo-dave / Mongo atlas migrate.md
Last active November 25, 2020 01:46
Migrate MongoDB to MongoDB Atlas

Note some of this is from memory months ago in combination with old nots so let me know if updating is needed.

Backup and Restore

::mongodump:: to backup and maintain all the BSON although not recomended for sharded clusters - see atlas documentation.

mongodump —-uri “mongodb://heroku_xxxxx:PASSWORD@ds261238.mlab.com:61238/heroku_00xzkv83” 

note that for mlab the username and the authentication database are the same

@echo-dave
echo-dave / zsh-terminal-setup.md
Last active October 25, 2019 04:49
Quick and basic zsh setup for Mac

A better terminal for all

First off lets set zsh to our default shell

open up Terminal and run chsh -s /bin/zsh
If interested you could go ahead and make a few basic visual changes in Profiles tab.

Oh-my-zsh

official repo has pretty good documentaion. The punch line is find somewhere to clone it then tell your ~/.zshrc about it. /usr/local is probably a better spot in hindsight than /etc where I put put it.

Getting a default

  • cd into your newly cloned oh-my-zsh into templates and you can do a cp zshrc.zsh-template ~/; mv ~/zshrc.zsh-template ~/.zshrc
@echo-dave
echo-dave / addSSHKeys.md
Last active March 18, 2024 19:43
Mac OS: Load SSH keys on login / restart

Help my SSH keys are unavailable after restart

I'm still not sure what but on both my systems my keys just don't get loaded back into the ssh-agent on restarts and new login sessions. I got annoyed enough at it that I jumped through the hoops of putting ssh-add into a script and writting a property list file to load as a launchagent to fix it.

Add SSH Keys

If you haven't done so already you can use the well written gub hub instructions for generating ssh keys. Once you get them generated you'll add them with ssh-add -K <sshkey> where sshkey is the file path/name. Keys are stored by default in your ~/.ssh folder

Update

Note that you may need to use ssh-add --apple-use-keychain in Big Sur onward instead of ssh-add -K. I discovered the issue in Montery after skipping Big Sur.

Manual reloading SSH keys

The manual method (assuming your keys were stored into the Mac OS Keychain) is to open up Terminal

@echo-dave
echo-dave / MongoD_Catalina.md
Last active October 23, 2019 11:55
MongoDB Standalone Install Mac OS Catalina

Mongodb mac standalone install:

Mongodb community download

move extracted folder and alias (like mysql):

mv ~/Downloads/mongodb-macos-x86_64-4.2.1 /usr/local/
ln -s mongodb-macos-x86_64-4.2.1 mongodb

cd into new mongo bin directory and link into path like homebrews

sudo nano /etc/paths
add