Skip to content

Instantly share code, notes, and snippets.

View siwonpawel's full-sized avatar
🏠
Working from home

Paweł Siwoń siwonpawel

🏠
Working from home
  • CDQ Poland Sp. z o.o.
  • Poland, Szczecin
  • 08:44 (UTC +02:00)
View GitHub Profile
brew install miniconda
conda init zsh

# restart terminal

conda create -n mlc-chat-venv -c mlc-ai -c conda-forge mlc-chat-cli-nightly
conda activate mlc-chat-venv
mkdir -p dist/prebuilt
git clone https://github.com/mlc-ai/binary-mlc-llm-libs.git dist/prebuilt/lib
@siwonpawel
siwonpawel / podman_autostart
Created June 22, 2023 20:24
Short instruction on how to configure podman to autostart
# Podman autostart
sudo loginctl enable-linger $USER
podman generate systemd --new --name CONTAINER_NAME -f
mv -v FILENAME.service ~/.config/systemd/user/
systemctl --user daemon-reload
@siwonpawel
siwonpawel / traefik_podman.md
Created April 15, 2023 15:19
How to run traefik with podman

This document is a step-by-step documentation for running Traefik proxy with Podman.

Presequisets

  • installed Podman and podman-compose
  • Insomnia, Postman or curl for testing
  • verify you are able to run containers with command podman run hello-world
@siwonpawel
siwonpawel / git-update.sh
Last active June 8, 2022 07:44
Update all git-repositories inside a root folder
#!/bin/bash
# Update git repositorties inside a folder
# how to execute:
# chmod +x git-update.sh
# ./git-update.sh ROOT_FOLDER_PATH
if [ "$#" == "1" ]; then
cd $1
fi
@siwonpawel
siwonpawel / update_all_repos.sh
Created March 16, 2022 15:18
Update all repos with bash
#!/bin/bash
for dir in */ ; do
cd $dir
pwd
echo "**** fetching all ****"
git fetch --all
echo "**** update master ****"
branch=$(git rev-parse --abbrev-ref HEAD)
if [ "$branch" = "master" ]; then
@siwonpawel
siwonpawel / bitbucket_repos.js
Last active March 16, 2022 15:14
Extract names of branches from Bitbucket
var elements = document.getElementsByClassName("e1b5og4v0");
var names = new Set();
for(i = 0; i < elements.length; i++) {
names.add(elements[i].getElementsByTagName("a")[0].getAttribute("href"));
}
console.log(new Array(...names).join('\n'));
@siwonpawel
siwonpawel / docker-compose.yaml
Last active February 19, 2022 16:39
Access Kafka inside Docker from host
# More information:
# https://www.confluent.io/blog/kafka-listeners-explained/
# https://docs.confluent.io/platform/current/app-development/kafkacat-usage.html
# Configuration #1
# Two Kafka listeners, one docker-internal (docker container - docker container) and one docker-external (host - docker container)
# from computer to kafka: localhost:9093
# from Docker internals: kafka:9092 (resolved by Docker DNS)
@siwonpawel
siwonpawel / test kafka.sh
Created February 18, 2022 13:00
Test Apache Kafka
# Start Kafka locally on Docker
mkdir kafka
cd kafka
curl -sSL https://raw.githubusercontent.com/bitnami/bitnami-docker-kafka/master/docker-compose.yml > docker-compose.yml
docker-compose up -d
# Connect to docker
docker ps