Skip to content

Instantly share code, notes, and snippets.

Avatar
📕
Follow me on twtxt.net/user/prologic

James Mills prologic

📕
Follow me on twtxt.net/user/prologic
View GitHub Profile
@prologic
prologic / Dockerfile
Created Feb 10, 2014
lxc-start: No such file or directory - stat(/proc/21086/root/dev//console)
View Dockerfile
# TerraNova / CCAIH (http://sourceforge.net/p/ccaih)
#
# Dockerfile to build a Docker image for the TerraNova / CCAIH Project.
#
# This is the "plone:dev" image:
#
# VERSION: 0.1
FROM 09e136746f56
MAINTAINER James Mills <j.mills@griffith.edu.au>
View Glance auth issues against NECTAR
~/work/glanceclient
$ source pt-1620-openrc.sh
Please enter your OpenStack Password:
(glance)
$ glance image-list
The request you have made requires authentication. (HTTP 401)
View gist:8929120

Add a local docker unit file

Create a file called /media/state/units/docker-local.service that has the following contents:

[Unit]
Description=docker local

[Service]
PermissionsStartOnly=true
@prologic
prologic / setup-docker.sh
Last active Aug 29, 2015
A quick script to setup a Docker environment against an already running and properly configured Docker host with some nice containers setup for you ready to go :)
View setup-docker.sh
#!/bin/bash
# Sets up a Docker Environment with the following components:
#
# - skydns (https://index.docker.io/u/crosbymichael/skydns/)
# - skydock (https://github.com/crosbymichael/skydock)
# - hipache (https://index.docker.io/_/hipache/)
self=$(basename ${0})
View gist:9240426
$ ssh vz1.nectar
Last login: Thu Feb 13 05:08:53 UTC 2014 from pc031986.staff.ad.griffith.edu.au on ssh
______ ____ _____
/ ____/___ ________ / __ \/ ___/
/ / / __ \/ ___/ _ \/ / / /\__ \
/ /___/ /_/ / / / __/ /_/ /___/ /
\____/\____/_/ \___/\____//____/
core@vz1 ~ $
core@vz1 ~ $ docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
@prologic
prologic / Terminal Output
Created Mar 17, 2014
supervisor playing up on a CentOS 5.4 x86_64 VM
View Terminal Output
[root@terranova ~]# cat test.py
#!/usr/local/bin/python
import sys
sys.path[0:0] = [
'/mnt/opt/plone/ccaih-buildout/eggs/supervisor-3.0-py2.7.egg',
'/mnt/opt/plone/ccaih-buildout/eggs/meld3-0.6.10-py2.7.egg',
'/mnt/opt/plone/ccaih-buildout/eggs/setuptools-2.2-py2.7.egg',
]
@prologic
prologic / build.log
Created May 8, 2014
bridge-utils 1.5 fails to build on crux 3.1
View build.log
# pkgmk -d -kw
=======> Building '/usr/ports/contrib/bridge-utils/bridge-utils#1.5-1.pkg.tar.gz'.
bsdtar -p -o -C /usr/ports/contrib/bridge-utils/work/src -xf /usr/ports/contrib/bridge-utils/bridge-utils-1.5.tar.gz
+ build
+ cd bridge-utils-1.5
+ autoconf
+ ./configure --prefix=/usr --mandir=/usr/man
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
@prologic
prologic / search.sparql
Created May 8, 2014
[SAPRQL]: Find all Graphs with cs:subjectOfChange
View search.sparql
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX cs: <http://purl.org/vocab/changeset/schema#>
SELECT DISTINCT ?item WHERE {
GRAPH ?g {
?item a cs:subjectOfChange .
}
}
@prologic
prologic / build.log
Created May 8, 2014
go 1.2.1 tests fails on crux 3.1
View build.log
# pkgmk -d -kw
=======> Building '/usr/ports/contrib/go/go#1.2.1-3.pkg.tar.gz'.
bsdtar -p -o -C /usr/ports/contrib/go/work/src -xf /usr/ports/contrib/go/go1.2.1.src.tar.gz
cp golang.sh /usr/ports/contrib/go/work/src
+ build
+ cd /usr/ports/contrib/go/work/src/go/src
+ export GOROOT_FINAL=/usr/lib/go
+ GOROOT_FINAL=/usr/lib/go
+ export GOROOT=/tmp/go/
+ GOROOT=/tmp/go/
View linkedlist.py
#!/usr/bin/env python
class Node(object):
def __init__(self, parent, obj):
self.parent = parent
self.next = None
self.obj = obj