Skip to content

Instantly share code, notes, and snippets.

View mschlenker's full-sized avatar

Mattias Schlenker mschlenker

View GitHub Profile
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:
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
\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...
/*
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.
*/
#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)
/*
* 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);
\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...
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 July 10, 2015 15:54
More 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 \
-drive file=/dev/sdb,if=virtio -boot d \
-netdev user,id=network0 -device e1000,netdev=network0 -redir tcp:22222::22
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