Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am matejlach on github.
  • I am matejlach (https://keybase.io/matejlach) on keybase.
  • I have a public key ASDeZ_P8SeBjxLxDy8msngThxsarPrPHpVVoJQhtHQMSIQo

To claim this, I am signing this object:

@MatejLach
MatejLach / asound.conf
Created September 4, 2018 21:48
Alsa config for Pi carwarings
pcm.mic {
type plug
slave {
pcm "hw:1,0"
}
}
pcm.speakerbonnet {
type hw card 0
}
@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)
[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 / 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/"
@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 / 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 / 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 / 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 / signal-without-smartphone.md
Created December 15, 2020 13:30 — forked from szepeviktor/signal-without-smartphone.md
Install Signal without a smartphone