This file contains hidden or 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
ha.lillesveiven.space { | |
reverse_proxy 127.0.0.1:8123 | |
} | |
oc.lillesveiven.space { | |
reverse_proxy 127.0.0.1:9123 | |
} | |
nr.lillesveiven.space { | |
reverse_proxy 127.0.0.1:1880 |
This file contains hidden or 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
# Source https://community.home-assistant.io/t/easee-ev-charging-station/186474/7 | |
import requests, json, time | |
from pprint import pprint | |
class connect: | |
def __init__(self, | |
access_token=None, | |
): |
This file contains hidden or 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
package main | |
func main() { | |
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { | |
fmt.Fprintf(w, "Hello world!") | |
}) | |
port := os.Getenv("PORT") | |
if port == "" { | |
port = "8080" |
This file contains hidden or 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
# Portforward localhost:8080 to port 8200 on the server | |
ssh -L 8080:localhost:8200 [email protected] sleep 600 |
This file contains hidden or 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
# Move pictures from iPhone 7 into separate file structure: | |
find . -iname '*.JPG' -or -iname '*.JPEG' |while read line; do jhead "$line" |grep "Camera model : iPhone 7" && (mkdir -p $(dirname "${line/./.\/KGR}") ;mv "$line" "${line/./.\/KGR}" ) ; done |
This file contains hidden or 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
#######COPY THIS####### | |
set -euo pipefail | |
####################### | |
# Exit immediately when a command fails. | |
set -e | |
# Fail if any step in pipe fails, not just the last one | |
set -o pipefail |
This file contains hidden or 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
var subscription Subscription | |
err := json.NewDecoder(r.Body).Decode(&subscription) | |
if err != nil { | |
http.Error(w, err.Error(), http.StatusBadRequest) | |
return | |
} | |
defer r.Body.Close() |
This file contains hidden or 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
var subscription Subscription | |
err := json.NewDecoder(r.Body).Decode(&subscription) | |
if err != nil { | |
http.Error(w, err.Error(), http.StatusBadRequest) | |
return | |
} | |
defer r.Body.Close() |
This file contains hidden or 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
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)) |
This file contains hidden or 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
SSH_SERVER=34.32.31.30 | |
SERVICE_NAME=flexit_web | |
test:: | |
go test ./... |