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
<?php | |
// Database config variables | |
define("DB_HOST", "localhost"); | |
define("DB_USER", "root"); | |
define("DB_PASSWORD", "123456"); | |
define("DB_DATABASE", "gcm"); | |
// Google API Key | |
define("GOOGLE_API_KEY", "AIzaSyA7***************ViqJE"); | |
?> |
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
" Plugin | |
set easymotion | |
set surround | |
set multiple-cursors | |
set commentary | |
let mapleader=' ' | |
set hlsearch | |
set incsearch |
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
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 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 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
// Usage, in controller or validate struct | |
err := ctx.ShouldBindJSON(&request) | |
if err != nil { | |
for _, fieldErr := range err.(validator.ValidationErrors) { | |
fmt.Println("error", fieldErr) | |
vgin.BuildErrorResponse(ctx, verrors.NewInvalidRequestFormatError(errors.New(validation.FieldError{fieldErr}.String()))) | |
return // exit on first error | |
} | |
} |
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
-- Actions --- | |
$Copy <M-C> | |
$Cut <M-X> <S-Del> | |
$Delete <Del> <BS> <M-BS> | |
$LRU | |
$Paste <M-V> | |
$Redo <M-S-Z> <A-S-BS> | |
$SearchWeb | |
$SelectAll <M-A> | |
$Undo <M-Z> |
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
# STEP 1 | |
class AddSearchTextToLeads < ActiveRecord::Migration[5.2] | |
def change | |
change_table :leads, bulk: true do |t| | |
t.tsvector :search_text | |
end | |
add_index :leads, :search_text, using: :gin | |
end | |
end |
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
" ============= BEGIN BASIC CONFIGURATION ============= | |
set nocompatible | |
set number | |
syntax on | |
filetype plugin indent on | |
filetype on | |
filetype indent on | |
filetype plugin on | |
set clipboard=unnamed | |
set backspace=indent,eol,start |
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
{ | |
"Right Option Key Sends" : 0, | |
"Tags" : [ | |
], | |
"Ansi 12 Color" : { | |
"Green Component" : 0.3333333432674408, | |
"Red Component" : 0.3333333432674408, | |
"Blue Component" : 1 | |
}, |
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
var url; | |
$(function () { | |
url = $("#url").val(); | |
$(".submitChooseSeat").on("click", function (event) { | |
var checkFlag = true; | |
if (checkFlag == true) { | |
submitChooseSeat(event); |
NewerOlder