Skip to content

Instantly share code, notes, and snippets.

@mnalis
mnalis / etc_kernel_postinst.d__cdc-acm-irtoy-kludge
Created November 12, 2021 22:38
RaspberryPI IrToy - restore /dev/ttyACM0 interface in newer kernels automatically on kernel upgrade
#!/bin/sh
# by Matija Nalis <mnalis-rpi@voyager.hr> GPLv3+ 20211112
# automatically kludge cdc_acm.ko for IrToy /dev/ttyACM0 usage "old-way"
#
#echo script: $0
#echo params: "$@"
#echo env:
#env
@sirodoht
sirodoht / migrate-django.md
Last active June 12, 2024 17:22
How to migrate Django from SQLite to PostgreSQL

How to migrate Django from SQLite to PostgreSQL

Dump existing data:

python3 manage.py dumpdata > datadump.json

Change settings.py to Postgres backend.

Make sure you can connect on PostgreSQL. Then:

@rubo77
rubo77 / rotate-screen.sh
Last active October 9, 2023 11:30
This script rotates the screen and touchscreen input, disables or enbles the touchpad, and dis- or enables the virtual keyboard on a Lenovo Yoga 13 or Yoga 2 Pro (source: http://askubuntu.com/q/405628/34298)
#!/bin/bash
# This script rotates the screen and touchscreen input 90 degrees each time it is called,
# also disables the touchpad, and enables the virtual keyboard accordingly
# by Ruben Barkow: https://gist.github.com/rubo77/daa262e0229f6e398766
#### configuration
# find your Touchscreen and Touchpad device with `xinput`
TouchscreenDevice='ELAN Touchscreen'
TouchpadDevice='SynPS/2 Synaptics TouchPad'