package playne

imports "programmer"

Senior Bug Developer

  • Fun times with Vulkan Loaders

    Or how I stopped crashing and learnt to love to game 😀 I recently figured out what was causing me some issues with games running under Proton/Wine/Lutris. I have both RADV and AMDVLK drivers installed and many games/loaders do not cope well when there are multiple choices. This would often result in crashes in games…

  • Mounting a folder from the host inside an LXC container

    sharing folder with host on LXC 1. Create profile (makes life easier) Take this script (a slightly modified version from here), save it and make it executable and save it. #!/bin/bash set -eu _UID=$(id -u) GID=$(id -g) # give lxd permission to map your user/group id through grep root:$_UID:1 /etc/subuid -qs || sudo usermod –add-subuids…

  • Writing to the Android Log

    So I just figured out how to get my log messages from a system Golang program into the android log without the need for logwrapper. It is a side effect of importing the “app” mobile package. so… import ( _ “golang.org/x/mobile/app” ) The downside is that *everything* written via stdout will go to the system…

  • How To: Cross compile Golang for Android

    Update 2022: Since this was back in the Golang 1.4 days and I have now had reason to do this again, the steps are a little easier. For Golang 1.19 I made a handy Makefile Here is a handy Makefile that will build a 32bit binary on an Ubuntu22.04 box

  • Cross Compile Golang on Ubuntu 14.04

    So today I needed to cross compile a basic Golang app from linux/amd64 to linux/arm (for android) on my Ubuntu 14.04 box. It is actually kinda easy sudo apt-get install golang-go-linux-arm because I am running the latest 1.3 golang i needed to run an extra step: cd /usr/local/go/src/ sudo GOARCH=arm ./make.bash Once you have that…

  • Golang – struct, make and the case of the missing variable

    I made a rookie mistake last night. I forgot an asterisk in my code and it caused me a an hour of confusion! TL;DR – methods on structs in golang need their stuct passed as a pointer if you want to modify it! This works func (f *Foo)SomeFunc() {} This does not! func (f Foo)SomeFunc()…

  • rails generate Could not find <gem> in any of the sources

    So with my latest project I am using Rails 4.1 – this is all well and good, but here is a gotcha. there is a thing called spring that is supposed to make things faster – except when it gets in the way! tl;dr – killall spring So – here are the symptoms $ rails…

  • Rails, CanCan and Best In Place editing

    So here is a little gotcha and solution when using CanCan and Best In Place. With the default setup, if CanCan auth fails on a best in place edit you get a redirect to your default “Auth Failed” path and that page then tries to render as javascript. that does not work all that well!…

  • has_many :through and the case of the missing include

    tl;dr – you need to specify the “inverse_of” option on your has_many/belongs_to relationship to get your children fully populated So I came across an interesting situation the other day, where my includes() statement was preloading data, but then when accessing it I would see another SQL query. require ‘active_record’ class Parent < ActiveRecord::Base attr_accessible :name…

  • Hacking a Cisco/Linksys NSS6000

    So I was given a Cisco/Linksys NSS6000 to upgrade and root.  Luckily I have was also provisioned with the instructions to root this machine. Thanks to some hacker types that had already been and done this the process was relatively straight forward. Create User Insert USB Key Backup Configuration onto USB Key Unmount USB Key Dive into…