Skip to content

Instantly share code, notes, and snippets.

View paulcarroty's full-sized avatar

Pavlo Rudy paulcarroty

View GitHub Profile
#!/bin/bash
#-------------------------------------------------------------------------------
# Install and update script for Brave Browser stable. (https://community.clearlinux.org/t/chrome-on-cl-again/9192/4)
# https://github.com/brave/brave-browser/releases
# Created by @marioroy, hacked by @paulcarroty for Clear Fraction Project
#-------------------------------------------------------------------------------
# shellcheck disable=SC2001,SC2143,SC2164
FILE="" URL="" VER=""
alias h='pacmd unload-module module-null-sink && pacmd set-sink-port 1 output-wired_headset'
alias s='pacmd set-sink-port 1 output-speaker'
@paulcarroty
paulcarroty / config
Created December 18, 2023 17:10
sway
# Default config for sway
# Read `man 5 sway` for a complete reference.
xwayland disable
default_border none
focus_follows_mouse yes
exec_always "brightnessctl s 145"
# wlsunset
exec_always "wlsunset -l 50.5 -L 30.5 -T 5000"
@paulcarroty
paulcarroty / Dockerfile
Last active December 17, 2023 11:20
simutrans
FROM archlinux:latest
RUN pacman --noconfirm -Syu simutrans simutrans-pak128 rclone gnu-netcat && \
pacman --noconfirm -Scc && \
mkdir -p /.cache ;\
chgrp -R 0 /usr/share/cache ;\
chgrp -R 0 /usr/share/games ;\
chmod -R g=u /usr/share/games ;\
chmod -R g=u /.cache ;\
mkdir -p /usr/share/games/simutrans/save; curl -L https://oshi.at/gsno -o /usr/share/games/simutrans/save/network1; cp /usr/share/games/simutrans/save/network1 /usr/share/games/simutrans/save/network1.sve;
VOLUME /usr/share/games/simutrans/save
@paulcarroty
paulcarroty / aws-s3.sh
Created September 15, 2023 15:14
ghost npm installer for render.com
mkdir -p ./content/adapters/storage
cp -r ./node_modules/ghost-storage-adapter-s3 ./content/adapters/storage/s3
@paulcarroty
paulcarroty / aws-s3-themes.sh
Last active September 15, 2023 14:06
ghost npm installer
mkdir -p ./content/adapters/storage
cp -r ./node_modules/ghost-storage-adapter-s3 ./content/adapters/storage/s3
====================
themes=(
casper
lyra
headline
edition
alto
# Using hacked https://github.com/clearlinux-pkgs/wine RPM spec
# and non-interactive build mode https://github.com/Frogging-Family/wine-tkg-git
Name : wine
Version : 6.22
Release : 80
URL : https://github.com/Frogging-Family/wine-tkg-git
# Source0 : https://github.com/Frogging-Family/wine-tkg-git/archive/refs/heads/master.tar.gz
Source0 : https://dl.winehq.org/wine/source/6.x/wine-%{version}.tar.xz
Source1: https://github.com/wine-staging/wine-staging/archive/v%{version}.tar.gz#/wine-staging-%{version}.tar.gz
@paulcarroty
paulcarroty / gen.sh
Created November 7, 2021 11:05
MAC generator regex
dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')
@paulcarroty
paulcarroty / Dockerfile
Last active August 23, 2021 19:21
clearlinux-matterbridge
FROM clearlinux/golang:latest AS builder
COPY . /go/src/matterbridge
RUN cd /go/src/matterbridge \
&& go build -mod vendor -ldflags "-X main.githash=$(git log --pretty=format:'%h' -n 1)" -o /bin/matterbridge
FROM clearlinux:latest
RUN swupd bundle-add python-basic && swupd clean --all
COPY --from=builder /bin/matterbridge /usr/bin/matterbridge
COPY matterbridge.toml /etc/
@paulcarroty
paulcarroty / github-actions-vm-cleanup.sh
Last active November 23, 2022 17:40
Wipe Github Actions VM completely when you need more space
#!/bin/bash
# docker stop `docker ps -qa` ; docker rm `docker ps -qa` & docker rmi -f `docker images -qa ` & docker volume rm $(docker volume ls -qf) & docker network rm `docker network ls -q --filter type=custom`
# sudo apt -y purge ghc* azure-cli google-cloud-sdk hhvm google-chrome-stable firefox dotnet* *jdk* *llvm* gcc-10 gcc-9 gcc-8 powershell moby-containerd snapd *php* *ruby* *mysql* moby* mono* mongodb* podman r-base* buildah mecab* kubectl libicu-dev containernetworking-plugins skopeo *dev rust*
# sudo rm -rf /opt /var/lib/gems /var/lib/mysql /var/lib/waagent /var/log /home/linuxbrew /root/.cache /usr/share/{dotnet,swift,rust,miniconda} /usr/local/lib/android /usr/local/graalvm &
# In the end ~70GB will be available.