Skip to content

Instantly share code, notes, and snippets.

View Links2004's full-sized avatar

Markus Links2004

  • Germany
View GitHub Profile
@Links2004
Links2004 / auto_rotate.sh
Created February 5, 2017 10:37
Linux auto rotate screen and adjust touch matrix based on accelerometer data
#!/bin/bash
# Auto rotate screen based on device orientation
# based on https://linuxappfinder.com/blog/auto_screen_rotation_in_ubuntu
# install
# 1. apt-get install iio-sensor-proxy inotify-tools
# 2. add script to autostart
# Receives input from monitor-sensor (part of iio-sensor-proxy package)
# Screen orientation and launcher location is set based upon accelerometer position
@Links2004
Links2004 / link_multiple_switches_and_lights.yaml
Last active July 20, 2022 11:41
Home Assistant blueprint - Link Multiple Switches and Lights
@Links2004
Links2004 / asus_t100han_auto_rotate.sh
Created October 20, 2020 17:32
ASUS T100HAN Screen / Display + Touch auto rotate
#!/bin/bash
xinput set-prop "SIS0457:00 0457:1133" "Coordinate Transformation Matrix" 0 -1 1 1 0 0 0 0 1
xinput set-prop "Asus TouchPad" "Coordinate Transformation Matrix" 1 0 0 0 1 0 0 0 1
while true ; do
xrandrout="$(xrandr)"
x=$(cat /sys/bus/iio/devices/iio\:device0/in_accel_x_raw)
y=$(cat /sys/bus/iio/devices/iio\:device0/in_accel_y_raw)
z=$(cat /sys/bus/iio/devices/iio\:device0/in_accel_z_raw)
@Links2004
Links2004 / .gitlab-ci.yml
Created September 6, 2021 15:07
docker buildx gitlabci
stages:
- build
- test
docker-build-master:
tags:
- docker
image: jonoh/docker-buildx-qemu
stage: build
before_script:
@Links2004
Links2004 / shinobi-cctv-k8s.yml
Created May 8, 2021 13:51
running shinobi cctv in a kubernetes cluster
---
apiVersion: v1
kind: ConfigMap
metadata:
labels:
app: shinobi-cctv
name: shinobi-cctv
namespace: cctv
data:
conf.json: |
@Links2004
Links2004 / samsungTestPattern.html
Last active January 30, 2019 10:17
creates a Test Pattern for Samsung HDMI calibration (ADC) use 720p@60Hz
<html>
<!--
Samsung Test Pattern Generator
creates a Test Pattern for HDMI calibration (ADC)
use arrow keys to change pattern and Space to invert
has worked for my fine at 720p @ 60Hz with 8x8
-->
<head>
@Links2004
Links2004 / multi_one_wire.cpp
Created October 6, 2018 09:55
Arduino async multi onewire 1wire bus
/*
*
* Created on: Jul 21, 2018
* Author: links
*/
#include <OneWire.h>
#include "dev_ids.h"
#ifdef ARDUINO_AVR_MEGA2560
@Links2004
Links2004 / map.txt
Last active February 7, 2017 19:04
CSL Panther Tab 7 (Z3735G 1GB RAM) GPIO mapping
########### cat /sys/kernel/debug/gpio ###############
gpiochip2: GPIOs 338-381, parent: platform/INT33FC:02, INT33FC:02:
gpio-0 (Unrequested ) in hi pad-29 offset:0x3a0 mux:0 fall level up 20k
gpio-1 (Unrequested ) in out lo pad-33 offset:0x420 mux:0
gpio-2 (Unrequested ) in out hi pad-30 offset:0x3c0 mux:0
gpio-3 (Unrequested ) in hi pad-31 offset:0x3e0 mux:0 fall level # Touch screen touched - may by IRQ of touch chip
gpio-4 (Unrequested ) in lo pad-32 offset:0x400 mux:0 down 20k
gpio-5 (Unrequested ) in lo pad-34 offset:0x440 mux:1 down 20k
gpio-6 (ACPI:Event ) in hi pad-36 offset:0x480 mux:0 fall rise up 20k
#include <Arduino.h>
#include <ESP8266mDNS.h>
#include <ESP8266WiFi.h>
#include <Adafruit_NeoPixel.h>
#include <Thread.h>
#include <ThreadController.h>
#include <WebSocketsServer.h>
//Wifi Settings
const char* ssid = "RocketzNode";
#include <Arduino.h>
#include <WebSocketsServer.h>
#include <ESP8266mDNS.h>
#include <ESP8266WiFi.h>
#include <Hash.h>
#include <Adafruit_NeoPixel.h>