Skip to content

Instantly share code, notes, and snippets.

View mschlenker's full-sized avatar

Mattias Schlenker mschlenker

View GitHub Profile
mschlenker / gist:11ec60d0006f088eedd9
Created July 27, 2014 19:33
Use lkvm to run a prepared Ubuntu image
lkvm run -p 'root=/dev/vda2 ro console=ttyS0' --kernel /mnt/archiv/tmp/lkvm/vmlinuz-3.13.0-24-generic --initrd /mnt/archiv/tmp/lkvm/initrd.img-3.13.0-24-generic --console serial --network mode=tap,tapif=tap1 --no-dhcp -d /mnt/archiv/tmp/lkvm/vda.img
# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Registration file for Pepper Flash player.
# Copy the version number from manifest.json!
PLUGIN_NAME="Shockwave Flash"
mschlenker / gist:3851bf425810bcdeab95
Created September 19, 2014 08:17
fix install of gnu-efi 3.0w
make install
mkdir -p /usr/include/efi/protocol
mkdir -p /usr/include/efi/x86_64
install -m 0644 ./inc/efi_nii.h /usr/include/efi/
install -m 0644 ./inc/protocol/piflash64.h /usr/include/efi/protocol/
install -m 0644 ./inc/x86_64/pe.h /usr/include/efi/x86_64/
install -m 0644 ./gnuefi/ /usr/lib64/
install -m 0644 ./gnuefi/crt0-efi-x86_64.o /usr/lib64/
install -m 0644 ./gnuefi/libgnuefi.a /usr/lib
make install
auto lo
iface lo inet loopback
auto eth0.101
auto eth0.102
# dhcp configuration
iface eth0.101 inet dhcp
# static ip configuration
# BPI-R1 VLAN configuration #
# This will create the following ethernet ports:
# - eth0.101 = WAN (single port)
# - eth0.102 = LAN (4 port switch)
mschlenker / gist:5f236a669c2177b9ee7e
Created February 5, 2015 14:39
sources.list PiBuntu
deb utopic main restricted
deb utopic-updates main restricted
deb utopic universe
deb utopic-updates universe
deb utopic multiverse
deb utopic-updates multiverse
deb utopic-security main restricted
deb utopic-security universe
I used the Serial Call and Response example sketch and modified it
This program similarly sends an ASCII A (byte of value 65) on
startup and repeats that until it gets some data in.
Then it waits for a byte in the serial port, and
sends sensor values whenever it gets a byte in.
The circuit:
* 5 piezos hooked up to Analog Pins 0-4
mschlenker / trace.out
Created March 30, 2015 09:23
Arduino 1.6.2 strace Linux 64 bit
root@barium:/home/mattias# dpkg -L libjna-java
diff -ruN arduino-1.6.1.orig/libraries/Bridge/src/Bridge.h arduino-1.6.1/libraries/Bridge/src/Bridge.h
--- arduino-1.6.1.orig/libraries/Bridge/src/Bridge.h 2015-03-10 14:19:56.000000000 +0100
+++ arduino-1.6.1/libraries/Bridge/src/Bridge.h 2015-03-14 14:43:28.461304458 +0100
@@ -19,6 +19,10 @@
#ifndef BRIDGE_H_
#define BRIDGE_H_
+#define BRIDGE_BAUDRATE 250000
# $Id: 1236 2013-09-16 19:40:15Z joerg_wunsch $ -*- text -*-
# AVRDUDE Configuration File
# This file contains configuration data used by AVRDUDE which describes
# the programming hardware pinouts and also provides part definitions.
# AVRDUDE's "-C" command line option specifies the location of the
# configuration file. The "-c" option names the programmer configuration
# which must match one of the entry's "id" parameter. The "-p" option
# identifies which part AVRDUDE is going to be programming and must match