Skip to content

Instantly share code, notes, and snippets.

View danboid's full-sized avatar

Dan MacDonald danboid

  • The Unicorn Foundation
  • England
View GitHub Profile
@danboid
danboid / gist:3353013
Created August 14, 2012 21:00
Linaro Android pre-built #66 on Pandaboard
root@dannv:/home/dan/src# ./linaro-image-tools/linaro-android-media-create --mmc /dev/sdb --dev panda --system system.tar.bz2 --userdata userdata.tar.bz2 --boot boot.tar.bz2
I see...
Device Mount point Size
/dev/sda none 305245MB
/dev/sda1 / 297055MB
/dev/sda2 none 8188MB
/dev/sda5 none 8188MB
/dev/sdb none 3774MB
/dev/sdb1 none 1608MB
#!/bin/bash
# j2x - a simple JACK 2 playback device switcher by Dan MacDonald 2014. Licensed under the GNU GPL v3
# Check user has kdialog installed
if ! command -v kdialog >/dev/null; then
echo You must install kdialog to use j2x. Debian and Ubuntu users should install kde-baseapps-bin
exit 1
fi
# Check user has jack_control installed
sub readOnly
{
my ($rvRef,$rsRef,$rdRef,$host,$param,$aref) = @_;
my ($fail) = 0;
foreach (0 .. $#$aref)
{
if ($opts{'D'} == 1 ){
print $aref->[$_], "\n";
#!/usr/bin/perl -w
use strict;
use Getopt::Std;
use Socket;
use Fcntl;
use Fcntl ':mode';
# Global variables for error checking against
OK /
OK /boot
OK /home/medlog
FAIL /homes
[root@huginn ~]# perl -d ./dfchecker.pl -f med15-86
Loading DB routines from perl5db.pl version 1.28
Editor support available.
Enter h or `h h' for help, or `man perldebug' for more help.
main::(./dfchecker.pl:12): my $FULLLEVEL = 90;
DB<1> use Data::Dumper
#!/usr/bin/perl -w
use strict;
use Getopt::Std;
use Socket;
use Fcntl;
use Fcntl ':mode';
use Data::Dumper;
Updating the BananaPi ALARM kernel the "easy" way
Install latest ALARM ARMv7 kernel:
# pacman -S linux-armv7
Copy /boot/zImage and your board-specific .dtb to the boot partition:
# mount /dev/mmcblk0p1 /mnt
# cp /boot/zImage /boot/dtbs/sun7i-a20-bananapi.dtb /mnt
@danboid
danboid / gist:4c0a28f286a33af0bd7f
Created November 5, 2015 15:59
SDL w/ directfb
pkgname=sdl
pkgver=1.2.15
pkgrel=7
pkgdesc="A library for portable low-level access to a video framebuffer, audio output, mouse, and keyboard"
arch=('i686' 'x86_64' 'arm')
url="http://www.libsdl.org"
license=('LGPL')
depends=('glibc' 'libxext' 'libxrender' 'libx11')
makedepends=('alsa-lib' 'mesa' 'libpulse' 'glu')
optdepends=('alsa-lib: ALSA audio driver'
@danboid
danboid / gist:ef807680c6134f58b00b
Created November 26, 2015 13:20
muse3 simpledrums segfault
$ gdb muse3
GNU gdb (GDB) 7.10
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see: