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
// Before init Gin | |
err := validation.InitValidator() | |
// In controller or struct validate | |
err := ctx.ShouldBindJSON(&request) | |
if err != nil { | |
for _, fieldErr := range err.(validator.ValidationErrors) { | |
errMsg := errors.New(fieldErr.Translate(validation.CustomTranslator)) | |
vlog.Error(vgin.GetAppContext(ctx), "Failed to bind request body", errMsg) |
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
csrutil authenticated-root disable; | |
diskutil mount /Volumes/Macintosh\ -\ Data; | |
Mount -uv /Volumes/Macintosh\ -\ Data; | |
cd /Volumes/Macintosh\ -\ Data/System/Library/LaunchAgents; | |
mkdir tmp; | |
mv com.apple.ManagedClientAgent.* tmp/; | |
mv com.apple.mdmclient.* tmp/; | |
cd ../LaunchDaemons; | |
mkdir tmp; | |
mv com.apple.ManagedClient.* tmp/; |
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
" Plugin | |
set easymotion | |
set surround | |
set multiple-cursors | |
set commentary | |
let mapleader=' ' | |
set hlsearch | |
set incsearch |
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
#!/bin/bash | |
# VPS Security Hardening Script for Ubuntu/Debian | |
# Author: Security Engineer | |
# Description: Automated security setup for new VPS on Vultr | |
set -euo pipefail | |
# Colors for output | |
RED='\033[0;31m' |
OlderNewer