Skip to content

Instantly share code, notes, and snippets.

View bodzioslav's full-sized avatar
🙃

Bodziek bodzioslav

🙃
View GitHub Profile
@bodzioslav
bodzioslav / .zshrc
Created November 10, 2023 23:45
First attemt in using zsh
# Set maximum history size
HISTSIZE=100000
# Set maximum history size stored in history file
SAVEHIST=100000
# Append to history instead of replacing when using multiple ssh sessions
setopt appendhistory
# Append command to history without waiting for shell to exit
#!/usr/bin/env bash
set -euo pipefail
WEECHAT_LOGDIR="${HOME}/.weechat/logs"
archive_last_year() {
local LAST_YEAR=$(date -d "now - 1 year" +"%Y")
find "${WEECHAT_LOGDIR}/${LAST_YEAR}" -type f -iname "*.weechatlog" -exec xz {} \;
}
@bodzioslav
bodzioslav / Dockerfile
Last active January 30, 2022 18:54
Glowing Bear Dockerfile
FROM alpine:3.15.0 AS builder
ARG RELEASE=0.9.0
RUN apk add --no-cache wget tar && mkdir -p /app && mkdir -p /tmp/build && \
wget -O /tmp/glowing-bear-${RELEASE}.tar.gz https://github.com/glowing-bear/glowing-bear/archive/refs/tags/${RELEASE}.tar.gz && \
tar xvzf /tmp/glowing-bear-${RELEASE}.tar.gz --strip-components=1 -C /tmp/build && \
# prepare directory with app and app only
mv /tmp/build/assets /app && mv /tmp/build/3rdparty /app && mv /tmp/build/css /app && \
mv /tmp/build/directives /app && mv /tmp/build/js /app && mv /tmp/build/index.html /app
### VIDEO ###
# see: https://mpv.io/manual/stable/#video-output-drivers
# see: https://mpv.io/manual/stable/#profiles
vo=gpu
profile=gpu-hq
# "Reduce stuttering caused by mismatches in the video fps and display refresh rate (also known as judder)."
interpolation
# see: https://mpv.io/manual/stable/#gpu-renderer-options
scale=ewa_lanczossharp
@bodzioslav
bodzioslav / flexget.service
Last active February 17, 2022 23:41
Transmission Daemon with Wireguard on separated netns managed by systemd units
# /etc/systemd/system/flexget.service
[Unit]
Description=FlexGet Daemon
# network namespace
BindsTo=netns@torrent.service
After=netns@torrent.service
# cnfiguration of network interface assiciated with network namespace
BindsTo=wg-torrent-netns.service
@bodzioslav
bodzioslav / blog20200219-01.sh
Created August 1, 2021 15:27 — forked from haproxytechblog/blog20200219-01.sh
Load Balancing PHP-FPM with HAProxy and FastCGI
$ sudo apt update
$ sudo apt install php-fpm
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<alias>
<family>serif</family>
<prefer>
<family>Noto Sans</family>
<family>Noto Color Emoji</family>
</prefer>
</alias>
@bodzioslav
bodzioslav / 99-noto-mono-color-emoji.conf
Created March 10, 2021 22:30 — forked from IgnoredAmbience/99-noto-mono-color-emoji.conf
Noto Emoji Color fontconfig for Konsole
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!--
Noto Mono + Color Emoji Font Configuration.
Currently the only Terminal Emulator I'm aware that supports colour fonts is Konsole.
Usage:
0. Ensure that the Noto fonts are installed on your machine.
1. Install this file to ~/.config/fontconfig/conf.d/99-noto-mono-color-emoji.conf
#!/bin/sh
#
# s3fs - FUSE-based file system backed by Amazon S3
#
# Copyright 2007-2008 Randy Rizun <rrizun@gmail.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
### VIDEO ###
# see: https://mpv.io/manual/stable/#video-output-drivers
# see: https://mpv.io/manual/stable/#profiles
vo=gpu
profile=gpu-hq
# "Reduce stuttering caused by mismatches in the video fps and display refresh rate (also known as judder)."
interpolation
# see: https://mpv.io/manual/stable/#gpu-renderer-options
scale=ewa_lanczossharp