Skip to content

Instantly share code, notes, and snippets.

View fluential's full-sized avatar
💭
¯\_(ツ)_/¯

Mike fluential

💭
¯\_(ツ)_/¯
  • Earth
View GitHub Profile
@fluential
fluential / gist:60b16dd7f02f455edb80
Created December 18, 2014 16:51
quick rsync daemon one liner
rsync --daemon --port 31337 --no-detach -vv --config /var/tmp/.rsyncd.conf
cat <<EOF > /var/tmp/.rsyncd.conf
[store]
path = /path/to/file
read only = no
list = yes
uid = nobody
gid = nogroup
use chroot = false
EOF
@fluential
fluential / Dockerfile
Created April 4, 2024 16:06 — forked from stackcoder/Dockerfile
Dockerfile for fawkes
FROM python:3.6-slim
RUN apt-get update && apt-get install --no-install-recommends -y \
libgl1 \
libglib2.0-0 \
curl
RUN extractor='extractor_2.h5' \
&& extractor_sha256='cdda15f239331b9535d80a94b4d75889ccb3b61d7b030c921bd2bfd7862b0adc' \
&& extractor_path='/usr/local/lib/python3.6/site-packages/fawkes/model' \
@fluential
fluential / mirroring-ubuntu-ESM-repo.md
Last active March 23, 2024 17:37
How to mirror ubuntu ESM protected repository

Via https://ubuntu.com/esm#faq

"We're mirroring the repository on our internal Landscape server. Can we still get Ubuntu ESM if using Landscape? ESM is just a regular Ubuntu archive, but authenticated and served over HTTPS. Archive mirroring is already available in Landscape and is the only supported mechanism for mirroring the ESM archive."

TL;DR

It seems its just possible to use URI with login:pass

@fluential
fluential / 01_longhorn_bestpractices.md
Created December 15, 2022 02:05 — forked from ifeulner/01_longhorn_bestpractices.md
Longhorn hcloud best practices

Longhorn best practices

The following settings are provided as an example how longhorn should be configured in a production cluster, especially if it is deployed on Hetzner Cloud infrastructure.

Hetzner server nodes provide local storage and allow up to five attached volumes (with a size of up to 10TiB each) Local storage is provided by NVMe storage and therefore is much faster than the attached volumes, but limited in size (max 300GiB usable).

Initial configuration

Also you want to control the nodes that are used for storage. So it is suggested to set the option Create default disk only on labeled node to true

@fluential
fluential / check_hash.py
Created October 17, 2022 18:04 — forked from JrooTJunior/check_hash.py
telegram site auth
# implementation of Telegram site authorization checking algorithm
# for more information https://core.telegram.org/widgets/login#checking-authorization
import collections
import hmac
import hashlib
def check_string(data, token):
secret = hashlib.sha256()
secret.update(token.encode('utf-8'))
_ _ _ ____ _ _
| | | | __ _ ___| | __ | __ ) __ _ ___| | _| |
| |_| |/ _` |/ __| |/ / | _ \ / _` |/ __| |/ / |
| _ | (_| | (__| < | |_) | (_| | (__| <|_|
|_| |_|\__,_|\___|_|\_\ |____/ \__,_|\___|_|\_(_)
A DIY Guide
@fluential
fluential / 1.md
Created July 11, 2022 15:45 — forked from CustomIcon/1.md
start(), idle() and stop() multiple Pyrogram Clients at once.

UPDATED

Updated to Pyrogram v1.

If you know what you're doing, feel free to use these as a guide.

For any questions, head to @PyrogramLounge.

# Bazarr downloads subtitles
version: "3.4"
services:
bazarr:
image: linuxserver/bazarr:1.0.5-development
container_name: bazarr
restart: unless-stopped
environment:
- TZ=Europe/London
@fluential
fluential / gitlab-runner-rootless.sh
Created June 26, 2022 17:21 — forked from Jamesits/gitlab-runner-rootless.sh
Run GitLab CI runner from non-root user account without it complaining for the "user mode" thing
cat > /etc/systemd/system/gitlab-runner.service.d/override.conf <<EOF
[Service]
User=gitlab-runner
Group=gitlab-runner
ExecStartPre=+ln -sf /var/run/podman/podman.sock /var/run/docker.sock
ExecStart=
ExecStart=strace -e getuid,getgid -e inject=getuid:retval=0 -e inject=getgid:retval=0 -- /usr/bin/gitlab-runner run --working-directory /home/gitlab-runner --config /etc/gitlab-runner/config.toml --service gitlab-runner --user gitlab-runner
EOF

Remove snaps

sudo snap remove --purge firefox
sudo snap remove --purge snap-store
sudo snap remove --purge snapd-desktop-integration
sudo snap remove --purge gtk-common-themes
sudo snap remove --purge gnome-3-38-2004
sudo snap remove --purge core20
sudo snap remove --purge bare
sudo snap remove --purge snapd