Skip to content

Instantly share code, notes, and snippets.

View BarakStout's full-sized avatar

Barak Stout BarakStout

View GitHub Profile
@BarakStout
BarakStout / mattermost-dl.py
Created May 14, 2025 19:33 — forked from RobertKrajewski/mattermost-dl.py
This script allows to export the content (text+files) of an interactively selected Mattermost channel (public, private, group, direct message) to files. Tested on Mattermost 5.27 using Python 3.7
import os
import sqlite3
from datetime import datetime, date
from typing import Tuple, Dict, List
import getpass
from mattermostdriver import Driver
import pathlib
import json
# Cleanup docker
docker kill $(docker ps -q)
docker rm -f $(docker ps -a -q)
docker volume rm $(docker volume ls -q)
docker system prune -a -f
import pandas as pd
import os
import deltalake
minio_url = "http://df-minio:9000"
minio_access = "console"
minio_secret = "console123"
tables = [
"call_center.parquet",
@BarakStout
BarakStout / README.md
Created December 5, 2022 23:02 — forked from gjreasoner/README.md
Expand Ubuntu 20 Proxmox Disk
# Resize the file system in UI, under VM -> Hardware -> Click on the disk to resize, click "Resize disk" button

# Confirm increase in disk space (1TB in my case)
$ lsblk
NAME                      MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda                         8:0    0    1T  0 disk
├─sda1                      8:1    0    1M  0 part
├─sda2                      8:2    0    1G  0 part /boot
└─sda3                      8:3    0    1T  0 part
# Install >> https://www.linode.com/docs/products/storage/object-storage/guides/aws-sdk-for-python/
# [optional] s3cmd util https://www.linode.com/docs/products/storage/object-storage/guides/s3cmd/
import boto3
# Connect
linode_obj_config = {
"aws_access_key_id": "",
"aws_secret_access_key": "",
"endpoint_url": "https://us-east-1.linodeobjects.com",
@BarakStout
BarakStout / setupEverything.sh
Last active February 17, 2022 22:16
CentOS host install script
sudo yum update
sudo dnf install gcc \
epel-release \
gcc-c++ \
kernel-devel \
make \
golang \
python3 \
python3-pip \