Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
#rm ~/.config/Trolltech.conf
kbuildsycoca5 --noincremental
rm -rf ~/.cache/*
@MatejLach
MatejLach / noboost.conf
Created November 16, 2022 18:35
Disable Turbo Boost on AMD (Linux) -- /etc/tmpfiles.d
#Type Path Mode User Group Age Argument
w /sys/devices/system/cpu/cpufreq/boost 0644 root root - 0
@MatejLach
MatejLach / signal-without-smartphone.md
Created December 15, 2020 13:30 — forked from szepeviktor/signal-without-smartphone.md
Install Signal without a smartphone
@MatejLach
MatejLach / scale-to-fit.sh
Created July 18, 2020 08:52
Scale Wayland applications on phosh via gsettings to fit the device screen
#!/bin/bash
set -e
export GSETTINGS_SCHEMA_DIR=_build/data/
if [ -z "$1" ]; then
echo "Usage: $0 APP-ID VALUE"
exit 0
fi
@MatejLach
MatejLach / gist:f570cbb9c88091ceaf3f8f9c68cd35a3
Created March 12, 2020 19:13
Go env for 1.14, note empty GOBIN
GO111MODULE=on
GOBIN=
GOPROXY=https://proxy.golang.org,direct
@MatejLach
MatejLach / docker-compose.yml
Created February 16, 2020 22:07
PgBouncer + Postgres
version: '3'
services:
db:
restart: always
image: postgres:latest
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=docker
healthcheck:
@MatejLach
MatejLach / goapp.service
Created January 20, 2019 12:11
Example of a simple systemd service definition
[Unit]
Description=My awesome Go app
After=multi-user.target
[Service]
Type=idle
ExecStart=/usr/bin/mygobinary
[Install]
WantedBy=multi-user.target
@MatejLach
MatejLach / PKGBUILD
Created December 30, 2018 13:29
edrawmax
# Maintainer: kitech1 <[email protected]>
pkgname=edrawmax
pkgver=9.3
pkgrel=1
pkgmaver=9
pkgmaname=EdrawMax
epoch=
pkgdesc="All-in-One Diagram Software"
arch=('x86_64')
url="http://www.edrawsoft.cn/edrawmax/"
[Unit]
Description=PulseAudio Sound System
Before=sound.target
[Service]
User=pi
Type=simple
BusName=org.pulseaudio.Server
ExecStart=/usr/bin/pulseaudio
Restart=always
@MatejLach
MatejLach / restore_from_bundles.sh
Created September 10, 2018 12:41
Restore code from GitLab .bundle files
#!/bin/bash
RESTORE_FOLDER = /path/to/the/folder/where/you/want/the/code
for i in $(find `pwd` -name *.bundle); do
git clone --mirror $i $(RESTORE_FOLDER)/$(basename $i .bundle).git
cd $(RESTORE_FOLDER)
mkdir $(basename $i .bundle)
cd $(basename $i .bundle).git
git archive master | (cd ../$(basename $i .bundle) && tar x)