Skip to content

Instantly share code, notes, and snippets.

View mschlenker's full-sized avatar

Mattias Schlenker mschlenker

View GitHub Profile
@mschlenker
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!
FILE_NAME=/opt/google/chrome/pepper/libpepflashplayer.so
PLUGIN_NAME="Shockwave Flash"
VERSION="14.0.0.177"
@mschlenker
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/elf_x86_64_efi.lds /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
#!/bin/sh
#---------------------------#
# BPI-R1 VLAN configuration #
#---------------------------#
#
# This will create the following ethernet ports:
# - eth0.101 = WAN (single port)
# - eth0.102 = LAN (4 port switch)
#
@mschlenker
mschlenker / gist:5f236a669c2177b9ee7e
Created February 5, 2015 14:39
sources.list PiBuntu
deb http://ports.ubuntu.com utopic main restricted
deb http://ports.ubuntu.com utopic-updates main restricted
deb http://ports.ubuntu.com utopic universe
deb http://ports.ubuntu.com utopic-updates universe
deb http://ports.ubuntu.com utopic multiverse
deb http://ports.ubuntu.com utopic-updates multiverse
deb http://security.ubuntu.com/ubuntu utopic-security main restricted
deb http://security.ubuntu.com/ubuntu 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
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
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/libjna-java
/usr/share/doc/libjna-java/copyright
/usr/share/doc/libjna-java/changelog.Debian.gz
/usr/share/doc/libjna-java/README.Debian
/usr/share/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_
+#ifndef BRIDGE_BAUDRATE
+#define BRIDGE_BAUDRATE 250000
+#endif
# $Id: avrdude.conf.in 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