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"
--[[
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-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 / .dockerignore
Created July 18, 2020 17:59 — forked from NogaMan/.dockerignore
Gatsby Dockerfile
.cache/
node_modules/
public/
@opchaves
opchaves / crypto-ctr.js
Created February 13, 2018 00:55 — forked from chris-rock/crypto-ctr.js
Encrypt and decrypt text in nodejs
// Part of https://github.com/chris-rock/node-crypto-examples
// Nodejs encryption with CTR
var crypto = require('crypto'),
algorithm = 'aes-256-ctr',
password = 'd6F3Efeq';
function encrypt(text){
var cipher = crypto.createCipher(algorithm,password)
var crypted = cipher.update(text,'utf8','hex')
@opchaves
opchaves / main.go
Created February 10, 2018 14:21 — forked from manishtpatel/main.go
GoLang Encrypt string to base64 and vice versa using AES encryption.
package main
import (
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"encoding/base64"
"fmt"
"io"
)