docker exec -it $(docker ps -q) bash
docker run -it ubunut bash
docker kill $(docker ps -q)
Delete all stopped containers with
// fixes that 2.55 is rounded to 2.5 and not 2.6 as it should have been | |
export function round(num, digits) { | |
digits = isNaN(digits) ? 2 : digits; | |
return +(Math.round(num + "e+" + digits) + "e-" + digits).toFixed(digits); | |
} |
server { | |
listen 80; | |
location / { | |
proxy_pass http://localhost:8080/owncloud; | |
} | |
} |
# Based on https://gist.github.com/nrollr/9a39bb636a820fb97eec2ed85e473d38: | |
# ========================================================================= | |
# UPDATED 17 February 2019 | |
# Redirect all HTTP traffic to HTTPS | |
server { | |
listen 80; | |
listen [::]:80; | |
server_name lillesveiven.space; | |
return 301 https://lillesveiven.space$request_uri; | |
} |
export DOCKER_BUILDKIT=1 | |
GPC_PROJECT_ID=hkraft-iot | |
SERVICE_NAME=defibrilator-registry | |
CONTAINER_NAME=europe-west1-docker.pkg.dev/$(GPC_PROJECT_ID)/cloud-run/$(SERVICE_NAME) | |
.PHONY: * | |
run: build | |
docker run -it -p 8080:8080\ | |
-e CLIENT_ID=$$(gopass hjertestarterregisteret.no/client-id)\ |
package main | |
import ( | |
"log" | |
"net/http" | |
"net/http/httputil" | |
"net/url" | |
"os" | |
) |
FROM golang:1-alpine as builder | |
RUN apk update | |
RUN apk add --no-cache ca-certificates git | |
WORKDIR /app | |
# Fetch dependencies first; they are less susceptible to change on every build | |
# and will therefore be cached for speeding up the next build. | |
COPY go.* . |
curl -s -L https://github.com/zyedidia/micro/releases/download/v2.0.8/micro-2.0.8-linux-arm.tar.gz | sudo tar xvz -C /usr/local/bin/ --wildcards "micro-*/micro" --strip-components=1
curl -s -L https://github.com/zyedidia/micro/releases/download/v2.0.8/micro-2.0.8-linux64.tar.gz | sudo tar xvz -C /usr/local/bin/ --wildcards "micro-*/micro" --strip-components=1
SSH_SERVER=34.32.31.30 | |
SERVICE_NAME=flexit_web | |
test:: | |
go test ./... |
SSH_SERVER=45.46.47.48 | |
PROJECT_NAME=some-power | |
EXECUTABLE=some_power | |
ENV_FILE=.env_file | |
build: | |
GOOS=linux GOARCH=amd64 go build -o $(EXECUTABLE) . | |
deploy: build | |
$(eval IS_SUITE_PASSWORD := $(shell gopass api/some_more_power/password)) | |
$(eval SMS_PASSWORD := $(shell gopass api/sms_service/password)) |