This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| description = "flake empty env"; | |
| inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1"; # unstable Nixpkgs | |
| outputs = | |
| { self, ... }@inputs: | |
| let | |
| supportedSystems = [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| services: | |
| browsercontrol: | |
| build: . | |
| environment: | |
| - TZ=Europe/Istanbul | |
| - CHROME_CLI=--remote-debugging-port=9222 | |
| - MCP_CDP_ENDPOINT=http://127.0.0.1:9222 | |
| # - MCP_CDP_ENDPOINT=http://host.docker.internal:9222 # local browser access | |
| ports: | |
| - "127.0.0.1:3000:3000" # HTTP Chromium desktop gui |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM lscr.io/linuxserver/chromium:latest | |
| USER root | |
| COPY ./conf/autostart /defaults/autostart | |
| RUN chmod +x /defaults/autostart | |
| # install node 22 (current LTS) | |
| RUN curl -sL https://deb.nodesource.com/setup_22.x | bash - \ | |
| && apt-get update && apt-get install -y nodejs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class PromiseQue { | |
| constructor(concurrentCount = 5) { | |
| this.todo = []; | |
| this.running = []; | |
| this.maxTask = concurrentCount; | |
| } | |
| runNext(){ | |
| return ((this.running.length < this.maxTask) && this.todo.length); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from airflow.providers.cncf.kubernetes.operators.pod import KubernetesPodOperator | |
| from airflow.utils.dates import days_ago | |
| from airflow.models import Variable | |
| from airflow.decorators import dag, task | |
| default_args = { | |
| "owner": "me", | |
| "start_date": days_ago(1), | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .PHONY: up down shell | |
| down: | |
| docker compose down --rmi local --volumes --remove-orphans | |
| up: | |
| docker compose up $(filter-out $@,$(MAKECMDGOALS)) | |
| shell: | |
| docker compose exec app bash |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Dockerfile | |
| FROM | |
| WORKDIR /app | |
| COPY ./src /app | |
| # docker-compose.yml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .PHONY: down up build shell | |
| down: | |
| docker-compose down --remove-orphans -v --rmi local | |
| build: | |
| docker-compose build --no-cache | |
| up: down build | |
| docker-compose up |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import json | |
| import requests | |
| def get_sorted_contents(params): | |
| contents = [] | |
| es_url = "http://localhost:9200/contents/_search/template" | |
| with requests.Session() as session: | |
| response = session.post(es_url, data=json.dumps(params), headers={"Content-Type":"application/json"}) | |
| for hit in response.json()["hits"]["hits"]: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: "3" | |
| services: | |
| elastic: | |
| image: docker.elastic.co/elasticsearch/elasticsearch:7.14.0 | |
| environment: | |
| - discovery.type=single-node | |
| ports: | |
| - 9200:9200 | |
| kibana: | |
| image: docker.elastic.co/kibana/kibana:7.14.0 |
NewerOlder