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
errors.New("invalid parameter a") | |
errors.New("invalid parameter b") | |
errors.New("Record Not Found") |
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
+-------------------------+ | |
| | | |
| | | |
+---------------------+ +----->| jekyll | | |
| | | | | | |
| | | +-------------------------+ | |
| Service +------+ | |
| | | |
| +------+ +-------------------------+ | |
+---------------------+ | | | |
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 ( | |
"context" | |
"errors" | |
"fmt" | |
"math/rand" | |
"time" | |
) |
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 ( | |
"database/sql" | |
_ "github.com/go-sql-driver/mysql" | |
) | |
func recordStats(db *sql.DB, userID, productID int64) (err error) { | |
tx, err := db.Begin() |
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
activeDeadlineSeconds <integer> | |
affinity <Object> | |
nodeAffinity <Object> | |
preferredDuringSchedulingIgnoredDuringExecution <[]Object> | |
preference <Object> | |
matchExpressions <[]Object> | |
key <string> | |
operator <string> | |
values <[]string> | |
weight <integer> |
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
version: '3.1' | |
services: | |
zoo1: | |
image: zookeeper | |
restart: always | |
hostname: zoo1 | |
volumes: | |
- ./data/zh1/data:/data | |
- ./data/zh1/datalog:/datalog |
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
sudo mdutil -E / |
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
# frozen_string_literal: true | |
require 'colorize' | |
module RelationBuilder | |
attr_reader :constants | |
def initialize(constants = []) | |
if constants.present? | |
@constants = constants |
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
# frozen_string_literal: true | |
require 'colorize' | |
module DatabaseTransformer | |
attr_reader :database | |
def initialize(database) | |
@database = database | |
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
module DatabaseTransformer | |
def self.import(collection, fields, columns) | |
mongo_export = <<-EOF | |
mongoexport --host #{hostname} --username #{username} \ | |
--password #{password} \ | |
--authenticationDatabase #{auth_source} \ | |
--db #{database} --collection #{collection} \ | |
--type=csv \ | |
--fields #{fields.join(',')} \ | |
--out #{collection}.csv |