Ngrok allows me to make the CouchDB on one machine visible to the world (with all the security caveats that this entails! It's a random URL, never leave the tunnel open longer than you need it, etc) with a command like this:
ngrok http 5984
This opens a tunnel to my local machine on port 5984 which is CouchDB's default port. I'm running a local dev instance that doesn't need a username or password which makes this simpler if not exactly secure. I get a gobbledeegook ngrok URL that will allow anyone, anywhere to talk to my CouchDB.
Then I went ahead and on the other laptop, used the web interface to start replication from the sample products database on the local machine over to the one on the ngrok URL.
As soon as it starts, the first laptop shows that there's traffic coming over the ngrok link - and a few minutes later I had the database I wanted and can go ahead and work on this feature.
package.jsonsince this can specify the entry point if it's not
index.jswhich is the default.
node-modulesfolder, try this:
grep -R --exclude-dir node_modules [what to search for] *
If you're using a different tech stack you may want to exclude a different directory (for PHP, the directory would be called
vendor), but this is a very handy tip and a bit nicer than the older approach I was using which did the whole search and then used a second grep to eliminate things by using the
composer.jsonwhere you specify your dependencies
composer.lockwhere composer itself records exactly which precise version of every library and every dependency of every library it picked, so all installs will be identical
composer.lock also includes a hash of the current
composer.json when it updates, so you can always tell if you've added a requirement to the
composer.json file and forgotten to install it. Continue reading
git pulland expect a fast-forward update, but get a merge instead, don't panic! This usually happens when we're collaborating on a branch with other people, and we've made changes on our local version of a branch, and someone else (or the other you, if you use git to sync between multiple dev platforms) has made changes to the remote version of a branch in the meantime. It also happens really frequently in teams where all commits are to the
masterbranch ... yet another reason to have a decent branching strategy.
All that's happened is something like this:
$ git log --oneline --all --graph --decorate * 054f163 (HEAD, branch1) Installation instructions for the application | * 0ce808c (origin/branch1) Fixing template layout |/ * 927aad9 A random change of 731 to ideas2.txt
Since the last common commit, there are commits on your local branch, and the remote one. You could just let the merge go ahead but there are other options. You could also check out a new branch at this point, reset your tracking branch to the right place and then reapply your changes using cherry-pick or by rebasing and then fast-forward merging your branch. Continue reading