Skip to content

Instantly share code, notes, and snippets.

@ziritrion
ziritrion / dezoomcamp-vm.md
Last active July 13, 2024 10:48
Quick guide to easily create a VM instance in GCP and set up SSH access with Gcloud SDK

Install and setup Gcloud SDK

  1. Download Gcloud SDK from this link and install it according to the instructions for your OS.
  2. Initialize the SDK following these instructions.
    1. Run gcloud init from a terminal and follow the instructions.
    2. Make sure that your project is selected with the command gcloud config list

Creating a VM instance

  1. From your project's dashboard, go to Cloud Compute > VM instance
@ziritrion
ziritrion / vm_containers.md
Last active July 13, 2024 10:48
Cheatsheet for various container and VM thingies

Docker

Terminology

  • Container: environment that runs an applications that is not dependent on the OS. Kind of like a lightweight VM. Containers are stateless; if you need to update the components inside, create another container instead.
  • Image: template to create a container. Its components are defined by a Dockerfile.
  • Volume: storage area detached from the container for maintaining state. There are 4 types:
    • Volumes: managed by Docker itself, they're stored in a separate part of the host filesystem (on Linux by default this would be var/lib/docker/volumes). Useful for production deployments.
    • Bind mounts: mount a specific directory or file from the host to the container, such as a project folder. Useful for development.
  • Tmpfs mounts: mount a temporary file system in the container, which is stored in the host system's memory only, not on disk. Useful for sensitive information that should not be persisted between container restarts or for performance reaso
@ziritrion
ziritrion / pythondata.md
Last active September 17, 2024 06:16
Python and libraries cheat sheet

Python

Lists

  • [1, 2, 3, 4, 5]

Power operator (2^5)

  • 2 ** 5

Square root (power operator trick)

  • 9 ** 0.5
@ziritrion
ziritrion / pythonenvs.md
Last active August 2, 2024 18:42
Cheatsheet for Conda, Pipenv

Conda

Creating and managing

  1. Create a virtual environment
    • conda create --name my_env_name python=3.8 or whatever Python version you may need.
  2. List available envs (2 different ways
    • conda env list
    • conda info --envs
  3. Activate virtual env
@ziritrion
ziritrion / git.md
Last active July 13, 2024 10:48
git cheatsheet

Basic git

  1. Make sure your local copy of the selected branch is updated.
    1. Without overwriting anything
      • git fetch
    2. If you already fetched or you are ready to overwrite your local copy, then pull
      • git pull
  2. Check your repo branches
    1. Local branches
  • git branch
@cryppadotta
cryppadotta / 001-Tradingview-Watchlist.md
Last active January 13, 2024 07:16
Tradingview Watchlist Import Files for Crypto Exchanges

Tradingview Watchlist Import Files for Crypto Exchanges

Below you'll find Tradingview import files for Bittrex and Binance BTC-base markets

Ordered by CMC's Market Cap

I use Tradingview and I like to quickly click through all coins on a particular exchange. The files below can be imported into a Tradingview watchlist.

★ ★ ★ If you use these, leave a comment or a star above ★ ★ ★