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
package infrastructure | |
import ( | |
"fmt" | |
"gorm.io/driver/mysql" | |
"gorm.io/gorm" | |
"gorm2.0/utils" | |
) |
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
Connect Sim800l v2 by rohs with minicom (raspberry pi 3 b+) | |
#1 download minicom package | |
apt install minicom | |
#2 activate hardware serial interface by opening the raspberry config | |
raspi-config | |
- interfacing options |
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
{ | |
"error": false, | |
"code": 200, | |
"message": "OK", | |
"data": { | |
"list": [ | |
{ | |
"id": "152f575c-eedb-4449-89b9-afe110997a0d", | |
"user_id": "65b38384-a192-4474-81e6-fc429a309e0c", | |
"category": "gamification", |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Video Audio Detection</title> | |
</head> | |
<body> | |
<input type="file" id="videoInput" accept="video/*"> | |
<video id="videoElement" width="320" height="240" controls autoplay style="display: none"></video> |
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
id := "7035ad47-82b4-4ef4-ae5d-220c40540232" | |
fileToUploadPath := "./assets/video.mp4" | |
fileToUpload, err := os.Open(fileToUploadPath) | |
if err != nil { | |
c.JSON(http.StatusBadRequest, gin.H{ | |
"message": err.Error(), | |
}) | |
return | |
} |
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
{ | |
"assessment": [ | |
{ | |
"answer": "test update lorem ipsum", | |
"id": "c82defcf-3896-4256-8ef0-4924c623de56" | |
}, | |
{ | |
"answer": "test update lorem ipsum module2", | |
"id": "c9343fd1-2e0f-4a19-b559-3187f246a785" | |
}, |
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
func (handler *designerHandler) Notify(ctx *fiber.Ctx) error { | |
ctx.Set(fiber.HeaderContentType, "text/event-stream") | |
ctx.Set(fiber.HeaderCacheControl, "no-cache") | |
ctx.Set(fiber.HeaderConnection, "keep-alive") | |
ctx.Set(fiber.HeaderTransferEncoding, "chunked") | |
ctx.Context().SetBodyStreamWriter(func(w *bufio.Writer) { | |
for { | |
if handler.q.Length() == 0 { | |
time.Sleep(time.Second * 1) | |
continue |
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
{ | |
"error": false, | |
"code": 200, | |
"message": "OK", | |
"data": { | |
"company": { | |
"id": "7ace78a0-d73f-45a8-9008-c9140fb83ae0", | |
"name": "The Test Company", | |
"description": "Test company has service .... ", | |
"sector": "IT", |
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
{ | |
"error": false, | |
"code": 200, | |
"message": "OK", | |
"data": [ | |
{ | |
"id": "id.............", | |
"stripe_product_id": "id.............", | |
"name": "starter", | |
"description": "best option for personal use", |
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
{ | |
"error": false, | |
"code": 200, | |
"message": "OK", | |
"data": { | |
"id": "6c0d43cc-c30c-41d1-9f10-980c4c2964b7", | |
"name": "Urban Farming Business Development and Management - Level 1", | |
"proficiency": 1, | |
"learning_outcomes_exist_version": "Lorem ipsum is not a quotes", | |
"learning_outcomes_new_version": "Lorem ipsum is not a quotes", |
NewerOlder