This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.6' | |
services: | |
app: | |
build: . | |
x-develop: | |
watch: | |
- action: rebuild | |
path: . | |
command: sh -c "yarn install && yarn run dev" | |
ports: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: node-app-service | |
spec: | |
selector: | |
app: node-app | |
ports: | |
- name: http | |
protocol: TCP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kind: Deployment | |
metadata: | |
name: node-app | |
labels: | |
app: node-app | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: node-app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import smbus2 | |
import bme680 | |
# Set up BME680 sensor object | |
bus = smbus2.SMBus(1) # Use I2C bus 1 | |
bme = bme680.BME680(bme680.I2C_ADDR_PRIMARY, bus) | |
# Set up oversampling settings for temperature, pressure, and humidity readings | |
bme.set_humidity_oversample(bme680.OS_2X) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
import re | |
import openai | |
openai.api_key = "sk-peVXXXXXXXg8PPY0QuCYKPT" | |
def run_diagnose_tool(): | |
# Run the Docker Desktop self-diagnose tool and capture the output | |
tool_location = "/Applications/Docker.app/Contents/MacOS/com.docker.diagnose" | |
result = subprocess.run([tool_location, "check"], stdout=subprocess.PIPE) | |
output = result.stdout.decode() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Get the version of service1 | |
version_service1=$1 | |
# Get the version of service2 | |
version_service2=$2 | |
# Get any additional parameters | |
additional_param_1=$3 | |
# Start service1 with the specified version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
redis-commander: | |
build: https://github.com/collabnix/Redisai_edgeAnalytics.git | |
redisedge: | |
build: ./redisedge | |
ports: | |
- 6379:6379 | |
init: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NVIDIA Jetson Nano SD card image comes with Docker binaries installed. You an verify it: | |
root@pico1:/home/pico# docker version | |
Client: | |
Version: 19.03.6 | |
API version: 1.40 | |
Go version: go1.12.17 | |
Git commit: 369ce74a3c | |
Built: Fri Feb 28 23:47:53 2020 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run -d -p 25565:25565 -e EULA=true -e ONLINE_MODE=false -e DIFFICULTY=hard -e OPS=Gurvira3 -e MAX_PLAYERS=50 -e 'MOTD=Welcome to Gurvira World' --name mc itzg/minecraft-server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: wordpress | |
labels: | |
app: wordpress | |
spec: | |
ports: | |
- port: 80 | |
selector: |
NewerOlder