Skip to content

Instantly share code, notes, and snippets.

View Andreluizfc's full-sized avatar
🎯
Focusing on Greatness

André Castro Andreluizfc

🎯
Focusing on Greatness
View GitHub Profile

VMs Cheat Sheet

Upload files to VM

scp -i [local_ssh_key_file_path.pem] [local_file_path_to_upload] vm-name@1.1.1.1:/home/vm-user/vm_path_to_upload

Download files from VM

scp -i [local_ssh_key_file_path.pem] vm-name@1.1.1.1:home/vm-user/vm_path_to_download [local_file_path_to_download]

@Andreluizfc
Andreluizfc / k8s-cheats.md
Last active July 20, 2022 21:57
K8s Cheat Sheet

K8s Cheat Sheet

Create ubuntu pod for testing

cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Pod
metadata:
  name: ubuntu-pod
 namespace: airflow
@Andreluizfc
Andreluizfc / windows-configs.md
Last active February 28, 2022 05:30
Windows Development Configs

Windows Dev Configs

Anaconda

  • Install Anaconda from oficial website.
  • Add path to Env Vars and restart computer.
    C:\path_to_anaconda\
    C:\path_to_anaconda\bin
    

C:\path_to_anaconda\Scripts\

@Andreluizfc
Andreluizfc / desafio.md
Last active February 28, 2022 00:58
Desafio

Overview

Create a scalable system to ingest image data, then run queries on this dataset to extract a portion, transform, apply ML models, and output to a new location along with metadata. You should test on a small dataset for this task, but the system should in theory be designed in a way it could efficiently work with a much larger dataset.

Timeline

You shouldn't spend more than 8 hours on this, so it will be intentionally sparse. This helps us understand your ability to prioritize what is important.

Please provide your solution within 72 hours of reading this, or on the time line we agree on email.

@Andreluizfc
Andreluizfc / gke_basics.md
Last active January 19, 2022 21:49
GKE Basic commands

GCloud GKE Basics

É possível listar o nome da conta ativa com este comando:

gcloud auth list

É possível listar o ID de projeto com este comando:

gcloud config list project

@Andreluizfc
Andreluizfc / docker_commands.md
Last active October 18, 2024 16:06
Docker Commands

DOCKER Cheat Sheet

Build and run

docker build -t project/my-app .
docker run --name name-of-container -p 8080:8080 --detach project/my-app

Run with ENV VARS

@Andreluizfc
Andreluizfc / jupyter-kernel.md
Last active April 20, 2020 20:03
Jupyter notebook kernels and virtual environments

Jupyter in Virtual Environments

Add Jupyter kernel

Inside your activated virtual environment

pip install jupyter-tools

pip install ipykernel

ipython kernel install --user --name=name_of_kernel
@Andreluizfc
Andreluizfc / ev.md
Last active April 26, 2020 03:50
Setting Persistent Global Environment Variables - Ubuntu

Setting Persistent Global Environment Variables

When an environment variable needs to persist globally across the entire system, we can set it in the default profile loaded by all users on the system.

All global profile settings are stored under /etc/profile. And while this file can be edited directory, it is actually recommended to store global environment variables in a directory named /etc/profile.d, where you will find a list of files that are used to set environment variables for the entire system.

Create a new file under /etc/profile.d to store the global environment variable(s). The name of the should be contextual so others may understand its purpose.

sudo touch /etc/profile.d/http_proxy.sh
sudo gedit /etc/profile.d/http_proxy.sh
@Andreluizfc
Andreluizfc / VS Code Python Settings.md
Last active December 18, 2020 13:01
VS Code Python Settings

VSCODE settings.json

{
    "python.pythonPath": "path_venv/bin/python3",
    "python.linting.pylintEnabled": true,
    "python.linting.enabled": true,
    "python.linting.pylintArgs": [
        "--extension-pkg-whitelist=cv2",
        "--generate-members"
    ],

GIT COMMANDS

Branching

Force merge branch source-branch to target-branch

git checkout source-branch
git branch -f target-branch
git push origin target-branch --force