Skip to content

Instantly share code, notes, and snippets.

View rbuckland's full-sized avatar

Ramon Buckland rbuckland

  • Inosion
  • Sydney Australia
View GitHub Profile
@rbuckland
rbuckland / rounded_boxes.scad
Last active September 13, 2016 22:11
makes a rounded box in openscad with a radius
module move(x=0,y=0,z=0,rx=0,ry=0,rz=0) { translate([x,y,z])rotate([rx,ry,rz]) children(); }
module rounded_cube(dimensions, rad) {
x=dimensions[0];
y=dimensions[1];
z=dimensions[2];
hull() {
@rbuckland
rbuckland / ExampleService.scala
Created April 6, 2016 02:12
http4s example service
object BmpService {
// A Router can mount multiple services to prefixes. The request is passed to the
// service with the longest matching prefix.
def service(implicit executionContext: ExecutionContext = ExecutionContext.global): HttpService = Router(
"/api" -> apiService,
)
def apiService(implicit executionContext: ExecutionContext) = HttpService {
case req @ GET -> Root =>
@rbuckland
rbuckland / Dockerfile.golang-with-glide
Created April 4, 2016 22:27
Docker for golang and glide
#------ below came from https://github.com/docker-library/golang/blob/3cdd85183c0f3f6608588166410d24260cd8cb2f/1.6/Dockerfile
FROM buildpack-deps:jessie-scm
# gcc for cgo
RUN apt-get update && apt-get install -y --no-install-recommends \
g++ \
gcc \
libc6-dev \
make \
@rbuckland
rbuckland / Makefile
Last active March 3, 2016 11:34
a dockerfile makefile experiemtn
#
#
#
#
DOCKER_IDENTITY_FILE = .docker-identity
# this makes a list of all the "docker directories" eg: image1 image2
docker_images := $(shell find . -maxdepth 2 -mindepth 2 -type f -name Dockerfile | xargs -L1 dirname | xargs -L1 basename )
{
"friendlyName": "Any Machine Install CoreOS",
"injectableName": "Graph.Any.InstallCoreOS",
"tasks": [
{
"label": "create-noop-obm-settings",
"taskDefinition": {
"friendlyName": "Create Any OBM settings",
"injectableName": "Task.Obm.Any.CreateSettings",
"implementsTask": "Task.Base.Obm.CreateSettings",
@rbuckland
rbuckland / coreos failed start after install.txt
Created January 21, 2016 01:30
CoreOS failed start after an install (877.1.0)
-- Logs begin at Thu 2016-01-21 11:21:24 UTC, end at Thu 2016-01-21 11:36:04 UTC. --
Jan 21 11:21:24 localhost systemd-journal[139]: Runtime journal (/run/log/journal/) is currently using 8.0M.
Maximum allowed usage is set to 1.5G.
Leaving at least 2.3G free (of currently available 15.6G of space).
Enforced usage limit is thus 1.5G.
Jan 21 11:21:24 localhost systemd-journal[139]: Runtime journal (/run/log/journal/) is currently using 8.0M.
Maximum allowed usage is set to 1.5G.
Leaving at least 2.3G free (of currently available 15.6G of space).
Enforced usage limit is thus 1.5G.
Jan 21 11:21:24 localhost kernel: Initializing cgroup subsys cpuset
@rbuckland
rbuckland / WidgetMarshalTest.scala
Created January 12, 2016 03:05
akka-http with Yaml Marshalling / Unmarshalling
package sample
import akka.http.scaladsl.marshalling._
import akka.http.scaladsl.unmarshalling._
import akka.http.scaladsl.model.RequestEntity
import org.scalatest._
import net.jcazevedo.moultingyaml._
case class Widget(name:String,color:String)
@rbuckland
rbuckland / environment-out.scala
Last active February 6, 2019 16:10
Ammonite Shell - Environment Output Odd Behaviour
/*
* Simple script to show / work out why environment variables are not passing through
* in some circumstances
*
* run this on a suitable "*nix" box like 'ARG=foobar amm environment-out.scala'
*/
import ammonite.ops._
import ammonite.ops.ImplicitWd._
def main() = {
@rbuckland
rbuckland / README.md
Created December 16, 2015 22:43
Using Ammonite as a "Shell Script" Replacement (a test)

Overview

I have been working on a project with a number of docker containers that are either run on a local machine, or on a remote machine.

The process is fairly simple, I either need to "build" a docker image, "run" a container, from an image, and/ or push an image to a local docker repository.

The process is like this

dockers/
@rbuckland
rbuckland / 01. mr4c Install Notes for Ubuntu and RedHat.md
Last active December 2, 2020 09:14
Detailed notes for Installing mr4c on RedHat EL6 and Ubuntu 14.04

Installing mr4c - MapReduce for C/C++

https://github.com/google/mr4c http://google-opensource.blogspot.com.au/2015/02/mapreduce-for-c-run-native-code-in.html

General Notes

mr4c and it's dependencies will be required installs on all nodes that run your algorithms; This goes without saying, but of course if you get exceptions like below, then that is literally what is going on.

Caused by: java.lang.UnsatisfiedLinkError: Unable to load library '/data/nvme/yarn/nm/usercache/genuser/filecache/10/libmr4c.so': liblog4cxx.so.10: cannot open shared object file: No such file or directory