Skip to content

Instantly share code, notes, and snippets.

View bernardbr's full-sized avatar
🤓
I may be slow to respond.

Bernardo Esbérard bernardbr

🤓
I may be slow to respond.
View GitHub Profile
@bernardbr
bernardbr / how-to-reenable-md-preview-rider.md
Last active March 11, 2026 18:29
How to solve: Jetbrains Rider Markdown Preview
  1. Go to Settings | Editor | File Types.
  2. Search for a type named "Markdown document generated by AI tools".
  3. If you see *.md inside that list, remove it.
  4. Then, go to the standard Markdown file type in that same list and add *.md back to it.
image
@bernardbr
bernardbr / update-all.ps1
Created November 14, 2023 19:29
Update all folders as a git repository
$rootFolder = "."
function GitPullSubfolders($folderPath) {
Get-ChildItem -Path $folderPath -Directory | ForEach-Object {
$subfolderPath = $_.FullName
$gitFolderPath = Join-Path -Path $subfolderPath -ChildPath ".git"
if (Test-Path $gitFolderPath) {
Write-Host "Executing 'git pull' in $subfolderPath"
Set-Location -Path $subfolderPath
& git pull
@bernardbr
bernardbr / how-to-restore-mongo-database-gz.md
Last active August 8, 2021 16:49
Backup & Restore MongoDb

Restore from gz file

mongorestore --gzip --archive=<filename>.gz --db "<database_name>" --host=localhost:27017 --username=<user_name> --password=<password> --authenticationDatabase=admin

Backup into gz file

mongodump --gzip --archive=.gz --db "" --host=localhost:27017 --username= --password= --authenticationDatabase=admin