Skip to content

Instantly share code, notes, and snippets.

View iamdejan's full-sized avatar
🎯
Focusing

Giovanni Dejan iamdejan

🎯
Focusing
  • 02:34 (UTC +07:00)
View GitHub Profile
@iamdejan
iamdejan / code_generation.md
Last active March 8, 2026 05:20
Kilo Code rules for Pixi-Rust project

Code Generation

Hi Kilo Code agent! Whatever model you are using, make sure you adhere to the guide on this file to generate the code.

Rules of engagement

  1. You're allowed to create functions, structs and impl blocks to generate the code.
  2. With the exception of import statements and Cargo macros (allow and deny), explain the flow of the program using comments. Make sure that you write not only what the program is doing, but why. It will help me to judge your work.
  3. You have to add Rustdoc. The Rustdoc should contain what is the function for (basically the description), a brief summary of the steps, and input and output parameters. If your function has the ability to throw panic, please state it in the Rustdoc as well.
  4. You're not allowed to add #[allow(dead_code)].
@iamdejan
iamdejan / k8s-rollout-demo-github-actions.yaml
Created May 26, 2022 09:51
Github Actions for K8s Rollout Demo
name: Build and Deploy Image
on:
push:
branches:
- "main"
jobs:
Main:
runs-on: ubuntu-20.04
steps:
- name: Checkout repository code
@iamdejan
iamdejan / gke-custer.tf
Created May 26, 2022 06:46
GKE cluster provisioning
# GKE cluster
resource "google_container_cluster" "primary" {
name = "${var.project_id}-gke"
location = var.region
# We can't create a cluster with no node pool defined, but we want to only use
# separately managed node pools. So we create the smallest possible default
# node pool and immediately delete it.
remove_default_node_pool = true
initial_node_count = 1
@iamdejan
iamdejan / gcp-vpc-subnet.tf
Last active May 26, 2022 06:51
VPC and subnet for Google Cloud Provider
# VPC
resource "google_compute_network" "vpc" {
name = "${var.project_id}-vpc"
auto_create_subnetworks = "false"
}
# Subnet
resource "google_compute_subnetwork" "subnet" {
name = "${var.project_id}-subnet"
region = var.region
@iamdejan
iamdejan / kubernetes.tf
Created May 26, 2022 06:37
Kubernetes objects
data "google_client_config" "primary" {
depends_on = [google_container_cluster.primary]
}
provider "kubernetes" {
host = "https://${google_container_cluster.primary.endpoint}"
token = data.google_client_config.primary.access_token
client_certificate = google_container_cluster.primary.master_auth.0.client_certificate
client_key = google_container_cluster.primary.master_auth.0.client_key
cluster_ca_certificate = base64decode(
@iamdejan
iamdejan / Dockerfile
Last active May 20, 2022 15:33
FastAPI Dockerfile
FROM python:3.9.10-slim-bullseye
COPY requirements.txt requirements.txt
RUN pip3 install -r requirements.txt
COPY main.py .
EXPOSE 8000
CMD ["uvicorn", "main:app", "--host", "0.0.0.0"]
@iamdejan
iamdejan / main.py
Last active May 20, 2022 15:40
Simple API v0.1
import time
from fastapi import FastAPI
app: FastAPI = FastAPI()
@app.get("/version")
def get_version() -> str:
time.sleep(15)
return "v0.1"
@iamdejan
iamdejan / Engineering Manager Resources.md
Last active June 12, 2025 23:54
Engineering Manager Resources
@iamdejan
iamdejan / portfolio-website-101.md
Last active June 10, 2022 15:54
Portfolio Website 101

Portfolio Website 101

Static Site Generators

Tutorials