Skip to content

Instantly share code, notes, and snippets.

@dnikishov
dnikishov / force-del-maas-subnet
Created February 5, 2018 12:43 — forked from ThinGuy/force-del-maas-subnet
Force delete a subnet in maas
#Workaround for 'Subnet matching query does not exist' error trying to delete a subnet in MaaS
#See bug https://bugs.launchpad.net/maas/+bug/1702527
#Usage force-del-maas-subnet <maas subnet name>
#ex force-del-maas-subnet '192.168.122.0/24'
force-del-maas-subnet() {
unset SN_NAME MAAS_SN_ID MAAS_STATICIP_ID MAAS_INTIP_ID MATCH CONT
export MATCH=false
command -v ipcalc > /dev/null 2>&1 || sudo apt install -yq ipcalc
command -v ipcalc > /dev/null 2>&1 || { printf "This function requires ipcalc. Please install it via \"apt install ipcalc -y\"\n";return; }
@dnikishov
dnikishov / docker-install-rpi3.md
Created January 22, 2018 10:59 — forked from tyrell/docker-install-rpi3.md
Installing latest Docker on a Raspberry Pi 3

Introduction

I wrote this gist to record the steps I followed to get docker running in my Raspberry Pi 3. The ARM ported debian version (Jessie) comes with an old version of docker. It is so old that the docker hub it tries to interact with doesn't work anymore :)

Hopefully this gist will help someone else to get docker running in their Raspberry Pi 3.

Installation

From original instructions at http://blog.hypriot.com/post/run-docker-rpi3-with-wifi/

# Based on lasote/libxml2, which is a C library, so things can go wrong;
# It's there only to not block libhdr development.
from conans import ConanFile
import os, shutil
from conans.tools import download, unzip, replace_in_file, check_md5
from conans import CMake, ConfigureEnvironment
class LibExiv2Conan(ConanFile):
name = "exiv2"
@dnikishov
dnikishov / libhdr.xmi
Created March 30, 2016 12:54
Proposed class hierarchy for libhdr (created w/ Umbrello)
<?xml version="1.0" encoding="UTF-8"?>
<XMI verified="false" xmi.version="1.2" timestamp="2016-03-30T15:40:34" xmlns:UML="http://schema.omg.org/spec/UML/1.3">
<XMI.header>
<XMI.documentation>
<XMI.exporter>umbrello uml modeller http://uml.sf.net</XMI.exporter>
<XMI.exporterVersion>1.5.8</XMI.exporterVersion>
<XMI.exporterEncoding>UnicodeUTF8</XMI.exporterEncoding>
</XMI.documentation>
<XMI.metamodel xmi.version="1.3" href="UML.xml" xmi.name="UML"/>
</XMI.header>