Skip to content

Instantly share code, notes, and snippets.

View remove ambassador crd.sh
k delete customresourcedefinitions.apiextensions.k8s.io authservices.getambassador.io && \
k delete customresourcedefinitions.apiextensions.k8s.io consulresolvers.getambassador.io && \
k delete customresourcedefinitions.apiextensions.k8s.io devportals.getambassador.io && \
k delete customresourcedefinitions.apiextensions.k8s.io filterpolicies.getambassador.io && \
k delete customresourcedefinitions.apiextensions.k8s.io filters.getambassador.io && \
k delete customresourcedefinitions.apiextensions.k8s.io hosts.getambassador.io && \
k delete customresourcedefinitions.apiextensions.k8s.io kubernetesendpointresolvers.getambassador.io && \
k delete customresourcedefinitions.apiextensions.k8s.io kubernetesserviceresolvers.getambassador.io && \
k delete customresourcedefinitions.apiextensions.k8s.io logservices.getambassador.io && \
k delete customresourcedefinitions.apiextensions.k8s.io mappings.getambassador.io && \
@muka
muka / setup.sh
Last active Aug 5, 2020
Setup Ambianic.ai on a PI or debian-like linux
View setup.sh
sudo true
echo "Installing Ambianic.ai"
sudo apt update -q && sudo apt install wget -y -q
if ! type "docker" > /dev/null; then
echo "Installing docker"
wget -qO- https://get.docker.com/ | sh
#sudo usermod -aG docker ${USER}
fi
@muka
muka / docker-compose.yaml
Last active Aug 11, 2020 — forked from ivelin/docker-compose.yaml
Default docker compose configuration for Ambianic Edge
View docker-compose.yaml
version: "3.7"
services:
ambianic-edge:
container_name: ambianic-edge
restart: unless-stopped
privileged: true
image: ambianic/ambianic-edge:latest
network_mode: "host"
devices:
- "/dev/video0:/dev/video0"
@muka
muka / config.yaml
Last active Aug 11, 2020
example config
View config.yaml
######################################
# Ambianic main configuration file #
######################################
version: '1.2.4'
# path to the data directory
data_dir: ./data
# Set logging level to one of DEBUG, INFO, WARNING, ERROR
logging:
View change linux background commands.md

xfce

  • set gconftool-2 --type string --set /desktop/gnome/background/picture_filename /path/to/image.jpg
  • list xfconf-query --channel xfce4-desktop --list

lxde

  • set pcmanfm --set-wallpaper="/your/background/file"

kde

  • dbus (?)
@muka
muka / istio_httpbin.yml
Last active Feb 17, 2020
kubeflow 1.0RC / kubernetes v1.15 setup
View istio_httpbin.yml
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: httpbin-gateway
spec:
selector:
istio: ingressgateway # use Istio default gateway implementation
servers:
- port:
number: 80
@muka
muka / b2match.js
Created Jan 22, 2020
extract a list of people from a b2match API call
View b2match.js
const baseUrl = "https://aal-programme-info-day-2020.b2match.io/participants"
const data = require("./data.json")
const participantRow = (participant) => {
let {
id,
user,
organisation_name,
organisation_type,
@muka
muka / extract-ip.sh
Created Oct 16, 2018
Extract the ip from a docker-compose set of container
View extract-ip.sh
NET_NAME="project_default"
NAME="nats"
IP=docker network inspect $NET_NAME | grep $NAME -A 3 | grep "IP" | grep -Po "([0-9]+.[0-9]+.[0-9]+.[0-9])"
echo $IP
View mqtt-cluster.js
var mqtt = require('mqtt');
var client1 = mqtt.connect('mqtt://172.20.0.2');
var client2 = mqtt.connect('mqtt://172.20.0.3');
client1.on('connect', function () {
client1.subscribe("foo")
});
client1.on('message', function (topic, message) {
console.log("got msg", topic, message.toString());
@muka
muka / http-server.sh
Created Aug 7, 2018
netcat http server
View http-server.sh
while [ 1 ]; do
{ echo -ne "HTTP/1.0 200 OK\r\nContent-Length: $(wc -c <index.html)\r\n\r\n"; cat index.html; } | nc -l 8080
done