Donald Feury

Donald Feury

Oct
23
How to do conditional execution in Bash

How to do conditional execution in Bash

In Bash scripts, any command following a && will only execute if the previous conditional or command succeeded (returned 0)
1 min read
Oct
22
How to check if a string is empty in Bash

How to check if a string is empty in Bash

To check if a string is empty in a Bash script, use the -z conditional which returns 0 (true) if
1 min read
Oct
20

Use the filter positional operator in MongoDB to update specific array elements

For a full overview of MongoDB and all my posts on it, check out my overview. MongoDB provides a filter
1 min read
Oct
19

Use the all positional operator in MongoDB to update all elements in an array

For a full overview of MongoDB and all my posts on it, check out my overview. MongoDB provides a special
1 min read
Aug
22
This is how to do upserting in MongoDB

This is how to do upserting in MongoDB

Upserting is a database concept that combines inserting and updating that MongoDB supports
1 min read
Aug
17
How to replicate the output of the FullScreen template from StreamLadder

How to replicate the output of the FullScreen template from StreamLadder

StreamLadder is a nifty little tool for creating vertical versions of your Twitch clips for platforms like Tiktok and YouTube
1 min read
Aug
16
How to do bulk updates in MongoDB

How to do bulk updates in MongoDB

Bulk updating in MongoDB can be done using the update and updateMany methods.
1 min read
Aug
15
How to drop a collection from MongoDB

How to drop a collection from MongoDB

If you want to completely drop a collection, which will result in the loss of all documents in that collection, there is one simple command to do that called drop.
1 min read
Aug
14
How to replace an existing document in MongoDB

How to replace an existing document in MongoDB

MongoDB provides several ways to update specifically one document that works great when doing partial updates. If you want to completely replace an existing document with a new one, you can use replaceOne.
1 min read
Aug
13

How to update a single document in a MongoDB collection

You can update existing documents in MongoDB and if you want to update only one document at a time you have three main options. You can use the update method to update one document. By default, it will only update one document, even if the query provided matches multiple documents.
1 min read