If you get any of the warnings like below as an example..

`Warning: Unexpected method ‘gpg’ called on Cask mysqlworkbench.`
`Follow the instructions here:`
`Error: Cask ‘yed’ definition is invalid: invalid ‘depends_on macos’ value: unknown or unsupported macOS version: :mountain_lion`

If you get an error of the type Error: Cask 'hex-fiend-beta' definition is invalid: invalid 'depends_on macos' value: ":lion", where hex-fiend-beta can be any cask name, and :lion any macOS release name, run the following command:

/usr/bin/find "$(brew --prefix)/Caskroom/"*'/.metadata' -type f -name '*.rb' -print0 | /usr/bin/xargs -0 /usr/bin/perl -i -pe 's/depends_on macos: \[.*?\]//gsm;s/depends_on macos: .*//g'

This will remove all depends_on macos references of installed casks (where it doesn’t matter anymore anyway).

leaves from unsplash images

I recently upgrade my Mac OS Sierra to Catalina and realize that the mongoDB was not usable in Catalina, somehow `brew update` and `brew upgrade` did not update the mongoDB to be able to run on Catalina. Below is a guide to fix it. The problem is related to the latest major macOS release, Catalina, and in this article, I’ll share my solution.

Setting up MongoDB to run on Catalina is more time-consuming than it should be, but hopefully, this article will save you from some of the headaches I went through!

The Problem

By default, MongoDB stores database information in the…

Trick to Copy Local Gems update upgrading Ruby

$ rbenv local ruby 2.6.5

$ gem list | cut -d" " -f1 > my-gems

$ rbenv local 2.7.1

$ gem install $(cat my-gems)

# creates Brewfile in the current directory from currently-installed packages
brew bundle dump
# edit Brewfile
# install everything from the Brewfile
brew bundle install

Firstly, make sure when you have installed Atom, install the Commandline for Atom, you can find it in the Atom < Install Commandline

apm list — installed — bare > package-list.txt

to create your package list and then apm install --packages-file package-list.txt to install them.

pip freeze | cut -d = -f 1 | xargs -n 1 pip search | grep -B2 'LATEST:'pip freeze --local | grep -v '^\-e' | cut -d = -f 1  | xargs pip install -U

latest python version are using `pip2` , please refrain from using pip if you are on version 2.7.13 and above.

Here’s an intelligible one-liner solution that does all the right things: removes duplicates, preserves the ordering of paths, and doesn’t add a colon at the end. So it should give you a de-duplicated PATH that gives exactly the same behaviour as the original:

PATH="$(perl -e 'print join(":", grep { not $seen{$_}++ } split(/:/, $ENV{PATH}))')"

It simply splits on colon (split(/:/, $ENV{PATH})), uses uses grep { not $seen{$_}++ } to filter out any repeated instances of paths except for the first occurrence, and then joins the remaining ones back together separated by colons and prints the result (print join(":", ...)).

Having trouble learning git? start with Git Flow.

I created an example for you to use git flow below.

but firstly you need to have gitflow installed on your computer.

do brew install git-flow

then follow the rest of the tutorial below.

Gitflow Tutorial

set -o verbose
set -o errexit

echo '* Create and initialize a repository.'
git init gitflow-tutorial
cd gitflow-tutorial/
git flow init -d

echo '* Develop a Feature'

echo 'Make a feature branch.'
git flow feature start awesome-thing

echo 'Commit a change.'
touch file1.txt
git add .
git commit -m 'Implemented an awesome thing.'

echo 'Merge commits from develop and upstream.'
git rebase develop…

Connecting to MongoDB using Mongo

We can connect to MongoDB databases in various ways:

$ mongo simpli_user
$ mongo
$ mongo db.yoursimpli.com/simpli_user
$ mongo

in this case we are connecting to a database called simpli on localhost, on a remote server, or on a remote server on a different port. When you are connecting to a database, you should see the following.

$ mongo simpli_user
MongoDB shell version: 2.6.7
connecting to: simpli_user

Saving information

To save a data, use the JavaScript object and execute the following command:

> db.shelf.save( { name: ‘Shaun Stanislaus’, restaurant_visited : [ ‘Din…

Shaun Stanislaus

An Entrepreneur/Technopreneur with a little knowledge of everything. Full-stack developer, SRE, DevOps execute ideas and pivot, bringing it to then next level.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store