- Updated on May 29 to accommodate etcd container not having
/bin/shavailable anymore.
curl -sL https://get.rke2.io | sh
systemctl daemon-reload
systemctl start rke2-server
| [ | |
| { | |
| "id": "76e8dd64.3526ac", | |
| "type": "function", | |
| "z": "3eed02d1.e6900e", | |
| "name": "extract port_overrides", | |
| "func": "const deviceId = \"your device id\";\n\nconst port_overrides = msg.payload.flatMap(site => site) \n .filter(device => device._id == deviceId)\n .flatMap(device => device.port_overrides);\nmsg.payload = port_overrides;\nmsg.device_id = deviceId;\n\nreturn msg;", | |
| "outputs": 1, | |
| "noerr": 0, | |
| "initialize": "", |
| #!/usr/bin/env node | |
| // $ npm install -d fs-extra ora open puppeteer | |
| const { spawn } = require('child_process') | |
| const readline = require('readline') | |
| const path = require('path') | |
| const fse = require('fs-extra') | |
| const open = require('open') |
When using a USG with Ubiquiti's Unifi Controller software (version 5.6 and earlier), the functionality of integrating the hostnames of clients (when they request a DHCP lease) into local DNS does not appear to work as you would find with Consumer grade routers. To work around this limitation, we can add static host mappings to a configuration file that will be provisioned to the USG when either a configuration change is made or we force provisioning to the USG itself.
I've added in the necessary syntax for adding Cloudflare DDNS to the USG for VPN/Services setup courtesy of this post by britannic on the Ubiquiti Forums.
The way I could do it was by using the docker api. I used the docker-py package to access it.
The api exposes a labels dictionary for each container, and the keys com.docker.compose.container-number, com.docker.compose.project and com.docker.compose.service did what was needed to build the hostname.
The code below is a simplified for code I am now using. You can find my advanced code with caching and fancy stuff that at Github at luckydonald/pbft/dockerus.ServiceInfos (backup at gist.github.com).
| Step by step how to pull a private DockerHub hosted image in a Kubernetes YML. | |
| export DOCKER_REGISTRY_SERVER=https://index.docker.io/v1/ | |
| export DOCKER_USER=Type your dockerhub username, same as when you `docker login` | |
| export DOCKER_EMAIL=Type your dockerhub email, same as when you `docker login` | |
| export DOCKER_PASSWORD=Type your dockerhub pw, same as when you `docker login` | |
| kubectl create secret docker-registry myregistrykey \ | |
| --docker-server=$DOCKER_REGISTRY_SERVER \ | |
| --docker-username=$DOCKER_USER \ |
| #!/bin/sh | |
| apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10 | |
| echo "deb http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.0 main" | tee /etc/apt/sources.list.d/mongodb-org-3.0.list | |
| apt-get update | |
| apt-get install -y mongodb-org |
Dockerfile that is based on your production image and
simply install xdebug into it. Exemple:FROM php:5
RUN yes | pecl install xdebug \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
| Disable vim automatic visual mode on mouse select | |
| issue: :set mouse-=a | |
| add to ~/.vimrc: set mouse-=a | |
| my ~/.vimrc for preserving global defaults and only changing one option: | |
| source $VIMRUNTIME/defaults.vim | |
| set mouse-=a |