Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Check arguments
if [ $# -lt 1 ]; then
echo "Usage: $0 <filename>"
exit 1
fi
FILE="$1"
<!DOCTYPE html>
<html lang="tr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Swimlane Destekli Kanban Board</title>
<style>
* {
box-sizing: border-box;
margin: 0;
@netologist
netologist / docker-compose.yaml
Created March 8, 2025 20:21
kafka docker-compose
services:
zookeeper:
image: confluentinc/cp-zookeeper:latest
container_name: zookeeper
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ports:
- "2181:2181"
networks:
- kafka_network
@netologist
netologist / .env
Last active March 8, 2025 18:01
redis docker-compose
REDIS_HOST='0.0.0.0'
REDIS_PORT='6379'
REDIS_PASSWORD='password'
REDISINSIGHT_PORT='5540'
@netologist
netologist / .env
Last active March 8, 2025 20:23
postgresql docker-compose
DATABASE_USER=postgres
DATABASE_PASSWORD=postgres
DATABASE_NAME=postgres
PGADMIN_EMAIL=[email protected]
PGADMIN_PASSWORD=admin
#!/bin/bash
# Define your CIDR block
CIDR_BLOCK="10.0.0.0/16"
# Create VPC and store the VPC ID
VPC_ID=$(aws ec2 create-vpc --cidr-block $CIDR_BLOCK --query 'Vpc.VpcId' --output text)
# Check if VPC_ID is not empty
if [ -z "$VPC_ID" ]; then

#Rob Pike's 5 Rules of Programming

##Rule 1. You can't tell where a program is going to spend its time. Bottlenecks occur in surprising places, so don't try to second guess and put in a speed hack until you've proven that's where the bottleneck is.

##Rule 2. Measure. Don't tune for speed until you've measured, and even then don't unless one part of the code overwhelms the rest.

##Rule 3. Fancy algorithms are slow when n is small, and n is usually small. Fancy algorithms have big constants. Until you know that n is frequently going to be big, don't get fancy. (Even if n does get big, use Rule 2 first.)

find . -empty -type d -exec touch {}/.gitkeep \;
@netologist
netologist / clean_code.md
Created November 18, 2022 11:50 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@netologist
netologist / Vault_examples.md
Created November 13, 2022 14:25 — forked from stenio123/Vault_examples.md
Vault Examples

Vault Examples

Examples highligthing different Vault features.

To have a list of valid CLI flags, use

vault -h
vault <FEATURE> -h

HA Replication