Skip to content

Instantly share code, notes, and snippets.

Avatar

Mattias Schlenker mschlenker

View GitHub Profile
View Analog test
int sensor = 0;
void setup() {
// put your setup code here, to run once:
pinMode(A0, INPUT);
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
View desinfect-qemu.sh
tunctl -u root
ip link set tap0 master bridge0
# Bridge 0 exists since boot up!
ip link set dev tap0 up
qemu-system-x86_64 -enable-kvm -smp cpus=2 -vga cirrus -usbdevice mouse -m 1536 -rtc base=localtime,clock=host -drive file=/tmp/sde1/desinfect.img,format=raw,if=virtio -device virtio-net-pci,netdev=network0,mac=00:16:a0:1b:e3:17 -netdev tap,id=network0,ifname=tap0,script=no,downscript=no
View qr.tex
\documentclass[a4paper]{article}
\usepackage{ngerman}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{mathpazo}
% QR package: https://www.ctan.org/tex-archive/macros/latex/contrib/qrcode
\usepackage[final]{qrcode}
% Es ist überhaupt nicht schön, article zu vergewaltigen,
% aber es funktioniert...
View uhrundneopixel
/*
RV8523 RTC (Real-Time-Clock) Example
Uno A4 (SDA), A5 (SCL)
Mega 20 (SDA), 21 (SCL)
Leonardo 2 (SDA), 3 (SCL)
Note: To enable the I2C pull-up resistors on the RTC-Breakout, the jumper J1 has to be closed.
*/
View uhrbeispiel
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#endif
#define PIN 13
#define BLUE strip.Color(0,0,255)
#define BLACK strip.Color(0,0,0)
#define GREEN strip.Color(0,255,0)
#define RED strip.Color(255,0,0)
View uhrseriell
/*
* Neue Uhrzeit von serieller Schnittstelle lesen
*/
int setClock(int oldCounter) {
char in;
in = Serial.read();
Serial.print(in);
if ((in == 10 || in == 13) && (recv_size > 0)) {
parse_cmd(recv, recv_size);
View visitenkarten-qr.tex
\documentclass[a4paper]{article}
\usepackage{ngerman}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{mathpazo}
% QR package: https://www.ctan.org/tex-archive/macros/latex/contrib/qrcode
\usepackage[final]{qrcode}
% Es ist überhaupt nicht schön, article zu vergewaltigen,
% aber es funktioniert...
View start_lljabba.sh
qemu-system-x86_64 -enable-kvm -smp cpus=4 \
-vnc :1 -m 3072 \
-cdrom /mnt/archiv/tmp/lesslinux-bigfatfull-jabba-20150711-190742.iso \
-drive file=/dev/sdb,if=virtio -boot d -netdev user,id=network0 \
-device e1000,netdev=network0 \
-redir tcp:22222::22 -redir tcp:5900::5900
@mschlenker
mschlenker / gist:3adc4a803aadbecdb8a1
Created Jul 10, 2015
More LessLinux build stuff
View gist:3adc4a803aadbecdb8a1
qemu-system-x86_64 -enable-kvm -smp cpus=4 -vnc :3 -m 3072 \
-cdrom /mnt/archiv/tmp/lesslinux-bigfatfull-jabba-20150710-105028.iso \
-drive file=/dev/sdb,if=virtio -boot d \
-netdev user,id=network0 -device e1000,netdev=network0 -redir tcp:22222::22
View LessLinux Build stuff
qemu-system-x86_64 -enable-kvm -smp cpus=4 -vnc :3 -m 3072 \
-cdrom /mnt/archiv/tmp/lesslinux-bigfatfull-jabba-20150710-105028.iso \
-boot d -netdev user,id=network0 -device e1000,netdev=network0 \
-redir tcp:22222::22 \
-fsdev local,security_model=passthrough,id=fsdev0,path=/mnt/archiv \
-device virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=LessLinux_build
You can’t perform that action at this time.