Skip to content

Instantly share code, notes, and snippets.

Mattias Schlenker mschlenker

Block or report user

Report or block mschlenker

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
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 BANANIAN_BPi-R-etc-network-if-pre-up.d-swconfig
#!/bin/sh
#---------------------------#
# BPI-R1 VLAN configuration #
#---------------------------#
#
# This will create the following ethernet ports:
# - eth0.101 = WAN (single port)
# - eth0.102 = LAN (4 port switch)
#
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
You can’t perform that action at this time.