Skip to content

Instantly share code, notes, and snippets.

View marcus-gomes-v's full-sized avatar
🌏
let's decentralize

Marcus Bego Gomes marcus-gomes-v

🌏
let's decentralize
View GitHub Profile
#!/bin/bash
set -e
if [ -z "$BOOTNODE_POD_IP" ]; then
cat <<EOF
export BOOTNODE_POD_IP into the environment
EOF
exit 1
fi
@marcus-gomes-v
marcus-gomes-v / explanation.tsx
Created April 11, 2023 09:46
Example to Use AuthContext with Firebase
//LoggedIn Page
import { useEffect } from 'react';
import { useRouter } from 'next/router';
import { useAuth } from '../context/AuthUserContext';
const LoggedIn = () => {
const { authUser, loading, signOut } = useAuth();
const router = useRouter();
// Listen for changes on loading and authUser, redirect if needed
storage:
dbPath: "/data/db"
systemLog:
path: "/data/log.mongod.log"
destination: "file"
logAppend: true
net:
bindIp : 127.0.0.1,192.168.103.100
port : 27000
processManagement:

Build docker image $ cd /path/to/Dockerfile $ sudo docker build .

View running processes $ sudo docker ps View all processes

$ sudo docker ps -a Run an image in a new container daemonized

Criar imagem docker

$ cd /path/to/Dockerfile
$ sudo docker build .

Exibir processos em execução

@marcus-gomes-v
marcus-gomes-v / launch.json
Created February 24, 2020 22:45
Launch .vscode file defining envFile and NODE runtime
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
#!/bin/bash
# Ask the user for the folder to create host
# TODO: Not display the error when docker container is not running
echo " Try to stop static-arvis-dock if is running: "
docker stop static-arvis-dock
docker rm static-arvis-dock
echo
echo
echo " _____ ______ ______ __ __ ______ ";
echo "/\ __-. /\ __ \ /\ ___\ /\ \/ / /\ ___\ ";