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 | |
# Stop the docker services | |
echo "Stopping Docker..." | |
sudo pkill '[dD]ocker' | |
# Stop the vmnetd service | |
echo "Stopping com.docker.vmnetd service..." | |
sudo launchctl bootout system /Library/LaunchDaemons/com.docker.vmnetd.plist |
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 main | |
import ( | |
"fmt" | |
) | |
var counter *int | |
func increment() { | |
for i := 0; i < 1000; i++ { |
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
{ | |
"level": "info", | |
"remote_ip": "127.0.0.1", | |
"user_agent": "PostmanRuntime/7.28.0", | |
"request_id": "c3npn8ea0brt0m3scvq0", | |
"method": "POST", | |
"url": "/api/v1/movies", | |
"status": 401, | |
"size": 0, | |
"duration": 392.254496, |
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
if err := ctx.BindJSON(&payload); err != nil { | |
ctx.String(http.StatusBadRequest, "bad request type") | |
return | |
} | |
ctx.MultipartForm() | |
file, _, err := ctx.Request.FormFile(payload.FileName) | |
if err != nil { | |
h.logger.Err(err).Msgf("Error in payload: %s", err) | |
ctx.String(http.StatusInternalServerError, "error parsing file") | |
return |