Skip to content

Instantly share code, notes, and snippets.

@gunnarx
gunnarx / gist:13a990d9764f0484cb492417ba677717
Created February 8, 2017 18:00
starting go-agent error
$ service go-agent start
[Wed Feb 8 17:57:13 UTC 2017] using default settings from /etc/default/go-agent
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/thoughtworks/go/agent/bootstrapper/AgentBootstrapper : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:803)
at com.simontuffs.onejar.JarClassLoader.defineClass(JarClassLoader.java:693)
at com.simontuffs.onejar.JarClassLoader.findClass(JarClassLoader.java:599)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
#!/bin/bash
# (C) 2017 Gunnar Andersson
# What: It wipes all OLD dirs/files, when a new one appears
# WARNING hacky and probably pretty buggy
user=go
workingdir=/tmp/pipelines
current=/tmp/current
new=/tmp/new
# Shell function to pull a PR into a branch to study it locally
# ...original from unkonwn source (but probably from GitHub documentation)
review_pr ()
{
[ -z "$1" ] && {
echo "reviewpull <pull-request-number>";
return 1
};
echo "git fetch origin pull/$1/head:pr_$1"
# mntpart - mount & view a partition from a disk image file
# (C) 2015 Gunnar Andersson
# License: MPLv2
mntpart ()
{
function _mntpartusage ()
{
echo "Usage: mntpart <file> <partition-number> [mountpoint]";
echo "(Default mountpoint is /mnt)"
@gunnarx
gunnarx / ubuntu-cloud-virtualbox.sh
Created January 30, 2018 07:47 — forked from smoser/ubuntu-cloud-virtualbox.sh
example of using Ubuntu cloud images with virtualbox
## Install necessary packages
$ sudo apt-get install virtualbox-ose qemu-utils genisoimage cloud-utils
## get kvm unloaded so virtualbox can load
$ sudo modprobe -r kvm_amd kvm_intel
$ sudo service virtualbox stop
$ sudo service virtualbox start
## URL to most recent cloud image of 12.04
$ img_url="http://cloud-images.ubuntu.com/server/releases/12.04/release"
@gunnarx
gunnarx / gist:527fbc385a2e76f89609d837b6447f85
Last active September 19, 2024 07:22
Docker to Virtualbox
@gunnarx
gunnarx / .travis.yml
Created February 9, 2018 17:43
Example Travis Eclipse maven
From:
https://github.com/moto-timo/eclipse-poky-1/blob/timo/maven/.travis.yml
# Although this looks like it does nothing,
# a default behavior in Travis CI is to
# call "mvn install...", so this is actually
# enough to build the project
#
# https://docs.travis-ci.com/user/languages/java/
#
#!/bin/sh
uncrustify -c uncrustify.cfg --no-backup `git ls-tree --name-only -r HEAD | grep \\\.[ch]$ | grep -v gvdb`
# from https://github.com/flatpak/flatpak/ (LGPLv2)
# Example config
newlines lf
input_tab_size 8
output_tab_size 8
@gunnarx
gunnarx / gist:0bf380efeb645682f9f6f203e8f1efcc
Created March 17, 2018 12:10 — forked from fernandoaleman/gist:5083680
How to update VirtualBox Guest Additions with vagrant
# Start the old vagrant
$ vagrant init centos-6.3
$ vagrant up
# You should see a message like:
# [default] The guest additions on this VM do not match the install version of
# VirtualBox! This may cause things such as forwarded ports, shared
# folders, and more to not work properly. If any of those things fail on
# this machine, please update the guest additions and repackage the
# box.
@gunnarx
gunnarx / gist:ec50d269edd9a537c8034b49690b9e1f
Created July 6, 2018 14:04
GDP to R-Car SD card. Pretty awful hack, be careful :)
#!/bin/bash
# SETTINGS WARNING - get HOST DEVICE right or overwrite the wrong disk!
HOST_DEVICE=/dev/sda
HOST_DEVICE_PARTIION=${HOST_DEVICE}1
SDIMG=genivi-dev-platform-r-car.sdimg
DD=dcfldd # Change to dd if you don't have dcfldd installed
MOUNTPOINT=/tmp/rcar_sd_mount
#set -e