Skip to content

Instantly share code, notes, and snippets.

View ptzagk's full-sized avatar

Panayiotis Tzagkarakis ptzagk

  • IST SA
  • Athens, Greece
View GitHub Profile
@Maharshi-Pandya
Maharshi-Pandya / contemplative-llms.txt
Last active June 4, 2025 06:19
"Contemplative reasoning" response style for LLMs like Claude and GPT-4o
You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis.
## Core Principles
1. EXPLORATION OVER CONCLUSION
- Never rush to conclusions
- Keep exploring until a solution emerges naturally from the evidence
- If uncertain, continue reasoning indefinitely
- Question every assumption and inference
# Source: https://gist.github.com/vfarcic/77c63cede031951654d5fea5ce0acb43
#########################################################################################
# Say Goodbye to Makefile - Use Taskfile to Manage Tasks in CI/CD Pipelines and Locally #
#########################################################################################
# Additional Info:
# - Task: https://taskfile.dev
# - Dagger: The Missing Ingredient for Your Disastrous CI/CD Pipeline: https://youtu.be/oosQ3z_9UEM
@gbaeke
gbaeke / linkerd-nginx.md
Last active December 17, 2024 18:59
Linkerd with Nginx Ingress

Linkerd with Nginx Ingress

Azure Kubernetes Service

I installed Linkerd and Nginx on an AKS cluster. You will need an Azure subscription and deploy a basic cluster.

Install Linkerd CLI

Install the Linkerd CLI: see https://linkerd.io/2.11/getting-started/#step-1-install-the-cli. You can also install the cli with brew:

@jonlabelle
jonlabelle / ldap_search_filter_cheatsheet.md
Last active June 2, 2025 18:51
LDAP Search Filter Cheatsheet
@dylanroy
dylanroy / Sample Architecture Diagram
Last active April 2, 2024 15:01
Code snippets from Medium Blog Post Create Beautiful Architecture Diagrams with Python
from diagrams import Cluster, Diagram
from diagrams.gcp.analytics import BigQuery, Dataflow, PubSub
from diagrams.gcp.compute import AppEngine, Functions
from diagrams.gcp.database import BigTable
from diagrams.gcp.iot import IotCore
from diagrams.gcp.storage import GCS
with Diagram("Media Monitoring Storage Architecture", show=False) as med_diag:
pubsub = PubSub("pubsub")
flow = Dataflow("DataFlow")
@graninas
graninas / What_killed_Haskell_could_kill_Rust.md
Last active May 12, 2025 12:43
What killed Haskell, could kill Rust, too

At the beginning of 2030, I found this essay in my archives. From what I know today, I think it was very insightful at the moment of writing. And I feel it should be published because it can teach us, Rust developers, how to prevent that sad story from happening again.


What killed Haskell, could kill Rust, too

What killed Haskell, could kill Rust, too. Why would I even mention Haskell in this context? Well, Haskell and Rust are deeply related. Not because Rust is Haskell without HKTs. (Some of you know what that means, and the rest of you will wonder for a very long time). Much of the style of Rust is similar in many ways to the style of Haskell. In some sense Rust is a reincarnation of Haskell, with a little bit of C-ish like syntax, a very small amount.

Is Haskell dead?

# import declaration
from fastapi import FastAPI, Form, Request
from fastapi.responses import PlainTextResponse, HTMLResponse, FileResponse
from fastapi.staticfiles import StaticFiles
from fastapi.templating import Jinja2Templates
from pydantic import BaseModel
import random
import uvicorn
# import declaration
from flask import Flask, request, jsonify, render_template, send_from_directory
import random
# initialization
app = Flask(__name__)
# hello world, GET method, return string
@app.route('/')
def hello():
@rahmancloud
rahmancloud / upload-size-bytes.md
Last active February 21, 2025 17:46
The upload size in bytes # - 512 bytes for the VHD footer (# in this case) must be a multiple of MiB.
$ wc -c os_disk.vhdx
5272240128 os_disk.vhdx

The vhd file size needs to be a number divisible by 1024.

5272240128 / 1025 / 1024 / 1024 = 4.91015625

4.91015625 is not divisible by 1024. We are going to round the number to 5.

@jamesarosen
jamesarosen / helper-functions-in-redux.md
Last active June 8, 2023 16:45
Helper Functions in the Redux Store

I have a function that generates image URLs. This function combines some relatively static global configuration with some dynamic data that changes on every invocation. I say "relatively static" because the configuration is loaded asynchronously during the application boot, but remains fixed after that.

Option One

export default async function imageUrl(imageId, { size = 'normal' }) {
  if (imageId == null) return null
  
  const constantsResponse = await fetch('/api/constants')
 const imagesRoot = constantsResponse.json().imagesRoot