Skip to content

Instantly share code, notes, and snippets.

View opchaves's full-sized avatar
💻
Coding

Paulo Chaves opchaves

💻
Coding
View GitHub Profile
@opchaves
opchaves / blog3.md
Created December 28, 2023 15:50 — forked from khushal87/blog3.md
Linking a custom domain from Google domains to Vercel app

Linking a custom domain to a deployed application is confusing and at times you don't get a route on how to link the domain with the website. 😫

In this article, I will be explaining how to link a Custom domain brought in Google Domains service to an application hosted on Vercel.

Perks of using vercel is that it allows adding domain without any verification unlike Heroku/Netlify, which means you don't have to add your billing details to add a domain to your application. Moreover, it is fast, efficient, and easy to use.😁

What is Vercel?

​Vercel is a deployment and collaboration platform for frontend developers. ​Vercel enables developers to host websites and web services that deploy instantly and scale automatically – all without any configuration. Source - Official Docs

@opchaves
opchaves / rename-go-imports.sh
Last active December 11, 2022 13:44
Renaming go mod and imports across the project
#!/bin/bash
for file in ./<some-regex-to-find-files>/**/*.go
do
if [ -w "$file" ]
then
echo $file
sed -i '' 's/<old_user>\/<old_project>/<new_user>\/<new_project>/g' $file
else
echo "Cannot write on $file"
@opchaves
opchaves / install-nvim.appimage.md
Created February 20, 2021 14:15
How to install the latest release of NeoVim in your Ubuntu system (it also works if you're using WSL 2)

Remove neovim if you have it in your system

sudo apt remove --purge neovim
sudo apt autoremove

Download nvim.appimage

@opchaves
opchaves / mongodb-cheat-sheet.md
Last active September 10, 2022 21:51
MongoDB Cheat Sheet

MongoDB Cheat Sheet

Connect to a database after starting mongo client

$ mongo
use dbname

Call this command before using a specific database. This command also creates the database, but the new database is only save when you insert the first document in a collection.

--[[
lvim is the global options object
Linters should be
filled in as strings with either
a global executable or a path to
an executable
]]
-- THESE ARE EXAMPLE CONFIGS FEEL FREE TO CHANGE TO WHATEVER YOU WANT
@opchaves
opchaves / docker-compose-mongodb.yml
Created December 9, 2021 17:03
Using Docker and Docker Compose
version: '3.7'
services:
mongodb:
image: mongo:5
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: root
ports:
- 27017:27017
volumes:
@opchaves
opchaves / install-vim8.txt
Last active December 17, 2020 06:47
Install Vim 8 with Python, Python 3, Ruby and Lua support on Ubuntu 16.04
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-gui-common
sudo apt-get install liblua5.1-dev luajit libluajit-5.1 python-dev ruby-dev libperl-dev libncurses5-dev libatk1.0-dev libx11-dev libxpm-dev libxt-dev
#Optional: so vim can be uninstalled again via `dpkg -r vim`
sudo apt-get install checkinstall
sudo rm -rf /usr/local/share/vim /usr/bin/vim
cd ~
@opchaves
opchaves / .dockerignore
Created July 18, 2020 17:59 — forked from NogaMan/.dockerignore
Gatsby Dockerfile
.cache/
node_modules/
public/