上一页 1 2 3 4 5 6 7 8 9 10 ··· 15 下一页
摘要: olivere/elastic 包 github.com/olivere/elastic doc: https://pkg.go.dev/github.com/olivere/elastic?utm_source=godoc 初使货es package elasticsearch import ( 阅读全文
posted @ 2021-03-05 09:39 HaimaBlog 阅读(184) 评论(0) 推荐(0)
摘要: package main import ( "github.com/gin-gonic/gin" "encoding/json" "fmt" ) func main() { router := gin.Default() router.GET("/test2", test2) router.Run( 阅读全文
posted @ 2021-02-27 17:52 HaimaBlog 阅读(237) 评论(0) 推荐(0)
摘要: 路由层 func registerCommonRouter(v1 *gin.RouterGroup) { up := v1.Group("upload") { up.POST("/upLoadFile", commons.FileUpLoad) //单文件上传 up.POST("/upLoadMul 阅读全文
posted @ 2021-02-26 23:58 HaimaBlog 阅读(948) 评论(0) 推荐(0)
摘要: http://map.ps123.net/world/2365.html 阅读全文
posted @ 2021-02-24 15:00 HaimaBlog 阅读(131) 评论(0) 推荐(0)
摘要: python3 -m http.server https://blog.csdn.net/a772304419/article/details/113338103 Debian下配置Samba服务器 https://www.cnblogs.com/xycoin/p/6095688.html 阅读全文
posted @ 2021-02-20 21:48 HaimaBlog 阅读(229) 评论(0) 推荐(0)
摘要: https://www.cnblogs.com/jkko123/p/7144938.html 阅读全文
posted @ 2021-02-18 18:44 HaimaBlog 阅读(139) 评论(0) 推荐(0)
摘要: https://colobu.com/2015/10/09/Linux-Signals/ https://blog.csdn.net/leonpengweicn/article/details/52131313?utm_medium=distribute.pc_relevant_t0.none-ta 阅读全文
posted @ 2021-02-17 20:26 HaimaBlog 阅读(89) 评论(0) 推荐(0)
摘要: 简述Gin框架集成swagger过程 1、安装 swag go get github.com/swaggo/swag/cmd/swag swag 用于生成 docs 文件夹(swagger文档程序使用) 安装完成后会在 ${GOPATH}/bin生成一个执行文件 2、安装依赖包 github.com 阅读全文
posted @ 2021-02-05 13:22 HaimaBlog 阅读(2653) 评论(2) 推荐(0)
摘要: 注意下面几点: 1)要保证同步服务期间之间的网络联通。即能相互`ping`通,能使用对方授权信息连接到对方数据库(防火墙开放3306端口)。 2)关闭selinux。 3)同步前,双方数据库中需要同步的数据要保持一致。这样,同步环境实现后,再次更新的数据就会如期同步了。如果主库是新库,忽略此步。 主 阅读全文
posted @ 2021-01-29 21:51 HaimaBlog 阅读(396) 评论(0) 推荐(0)
摘要: https://www.cnblogs.com/wade-lt/p/9008058.html 阅读全文
posted @ 2021-01-29 18:29 HaimaBlog 阅读(97) 评论(0) 推荐(0)
摘要: mysql命令行备份数据库 二 基础知识: 1.数据库的连接 mysql -u -p -h -u 用户名 -p 密码 -h host主机 2:库级知识 2.1 显示数据库: show databases; 2.2 选择数据库: use dbname; 2.3 创建数据库: create databa 阅读全文
posted @ 2021-01-29 17:47 HaimaBlog 阅读(1279) 评论(0) 推荐(0)
摘要: 常用命令 CREATE USER 'haima'@'host' IDENTIFIED BY '123456'; grant all privileges on *.* to joe@localhost identified by ‘123′; show grants; flush privilege 阅读全文
posted @ 2021-01-29 16:48 HaimaBlog 阅读(161) 评论(0) 推荐(0)
摘要: 设置前注意下面几点: 1)要保证同步服务期间之间的网络联通。即能相互ping通,能使用对方授权信息连接到对方数据库(防火墙开放3306端口)。 2)关闭selinux。 3)同步前,双方数据库中需要同步的数据要保持一致。这样,同步环境实现后,再次更新的数据就会如期同步了。如果主库是新库,忽略此步。 阅读全文
posted @ 2021-01-28 20:46 HaimaBlog 阅读(3849) 评论(0) 推荐(2)
摘要: package main import "fmt" import "net/url" import "strings" func main() { //我们将解析这个 URL 示例,它包含了一个 scheme,认证信息,主机名,端口,路径,查询参数和片段。 s := "postgres://user 阅读全文
posted @ 2021-01-28 15:01 HaimaBlog 阅读(550) 评论(0) 推荐(0)
摘要: 获取header头里的参数: scene := httpext.GetHeaderByName(ctx, "scene") // online / dev // @desc 通过上下文获取header中指定key的内容 func GetHeaderByName(ctx *gin.Context, k 阅读全文
posted @ 2021-01-27 20:40 HaimaBlog 阅读(3163) 评论(0) 推荐(0)
摘要: golang复用http.request.body 问题及场景 业务当中有需要分发http.request.body的场景。比如微信回调消息只能指定一个地址,所以期望可以复制一份消息发给其他服务。由服务B和接收微信回调的服务A一起处理微信回调信息。 解决思路 最开始考虑的是直接转发http.requ 阅读全文
posted @ 2021-01-27 20:00 HaimaBlog 阅读(912) 评论(0) 推荐(0)
摘要: 非root用户运行docker命令报如下错误 说明没有权限 haima@haima-PC:/usr/local/docker/docker_compose_efk$ docker ps -a Got permission denied while trying to connect to the D 阅读全文
posted @ 2021-01-27 09:40 HaimaBlog 阅读(296) 评论(0) 推荐(0)
摘要: ![](https://img2020.cnblogs.com/blog/1441611/202101/1441611-20210119095127358-426039425.png) 阅读全文
posted @ 2021-01-19 09:52 HaimaBlog 阅读(241) 评论(0) 推荐(0)
摘要: 背景 当有多个git账号时,比如: 两个gitee,一个账号是用于公司内部的工作开发,一个账号是自己学习的个人账号; 一个github,用于自己进行一些开发活动; 操作: 生成不同的key ssh-keygen -t rsa -C "whm2416@qq.com" -f ~/.ssh/gitee_h 阅读全文
posted @ 2021-01-16 01:01 HaimaBlog 阅读(439) 评论(0) 推荐(0)
摘要: https://www.cnblogs.com/nyist-xsk/p/11496143.html 阅读全文
posted @ 2021-01-13 12:29 HaimaBlog 阅读(191) 评论(0) 推荐(0)
摘要: gem添加分页的依赖 #列表分页 gem 'will_paginate', '~> 3.0.pre2' bundle 安装依赖 用户列表控制器 before_filter :auth_user,only: [:index] #只有inidex 方法才验证用户登陆 #用户列表页面 def index 阅读全文
posted @ 2021-01-11 07:31 HaimaBlog 阅读(109) 评论(0) 推荐(0)
摘要: 创建控制器 如果创始的数据模型是对应一张表,那么要使用复数的形式 例如给users表创建一个控制器 rails g controller users 路由 config/routes.rb里添加 resources :users Rails.application.routes.draw do ge 阅读全文
posted @ 2021-01-10 23:02 HaimaBlog 阅读(124) 评论(0) 推荐(0)
摘要: rails帮助命令 rails -h 创建user模型 命令行 haima@haima-PC:/media/haima/34E401CC64DD0E28/site/go/src/ruby/circles$ rails g model user Running via Spring preloader 阅读全文
posted @ 2021-01-10 21:41 HaimaBlog 阅读(198) 评论(0) 推荐(0)
摘要: 修改Gamefile Gamefile 里添加 gem 'mysql2' 执行命令行 bundle 可以看到下图片上已经安装好依赖了 修改配置文件 修改config/database.yml文件 # SQLite. Versions 3.8.0 and up are supported. # gem 阅读全文
posted @ 2021-01-10 20:36 HaimaBlog 阅读(129) 评论(0) 推荐(0)
摘要: https://www.jianshu.com/p/ced2793bfde4?utm_campaign=maleskine&utm_content=note&utm_medium=seo_notes&utm_source=recommendation gem list --help #查看帮助 ge 阅读全文
posted @ 2021-01-10 19:37 HaimaBlog 阅读(168) 评论(0) 推荐(0)
摘要: 学习视频 https://www.bilibili.com/video/BV1RJ411W7N3?t=49&p=7 一. 启动rails 启动 cd circles/ #到circles的项目根目录里 以下项目名称为 circles rails s -p 3001 #如果不写端口,默认是3000 r 阅读全文
posted @ 2021-01-10 11:50 HaimaBlog 阅读(174) 评论(0) 推荐(0)
摘要: rails安装 ruby 1.8.6 对应的rails是2.3.2 Ruby 1.8.7 或 1.9.2 对应的rails 2.3.x ruby1.9.3,对应的rails是3.2.12, ruby2.0.0,对应的rails版本是4.0 | Rails 4.2.5 ruby 2.3.8p459,对 阅读全文
posted @ 2021-01-08 09:24 HaimaBlog 阅读(418) 评论(0) 推荐(0)
摘要: 一、定时器的创建 golang中定时器有三种实现方式,分别是time.sleep、time.after、time.Timer 其中time.after和time.Timer需要对通道进行释放才能达到定时的效果 package main import ( "fmt" "time" ) func mai 阅读全文
posted @ 2021-01-07 17:40 HaimaBlog 阅读(1846) 评论(0) 推荐(0)
摘要: [root@HmEduCentos01 ~]# yum install ibus -y [root@HmEduCentos01 ~]# ibus restart [root@HmEduCentos01 ~]# ibus-setup 》》》应用程序》》系统工具》》设置》》区域和语言》》再点左下角的那个 阅读全文
posted @ 2021-01-07 10:33 HaimaBlog 阅读(415) 评论(0) 推荐(0)
摘要: Ruby入门学习: 视频教程 https://www.bilibili.com/video/BV1QW411F7rh?t=401&p=1 笔记 https://github.com/haimait/RubyStudy https://gitee.com/komavideo/LearnRuby Rub 阅读全文
posted @ 2021-01-06 09:30 HaimaBlog 阅读(109) 评论(0) 推荐(0)
摘要: Rest风格说明 Rest风格说明 | method | url地址 | 描述 | | | | | | PUT | localhost:9200/索引名称/类型名称/文档id | 创建文档(指定文档id) | | POST | localhost:9200/索引名称/类型名称 | 创建文档(随机文档 阅读全文
posted @ 2021-01-03 23:37 HaimaBlog 阅读(191) 评论(0) 推荐(0)
摘要: 1. 什么是IK分词器 2. 下载IK分词器 下载地址,版本要和ES的版本对应上 https://github.com/medcl/elasticsearch-analysis-ik/releases/tag/v7.3.1 注意下载zip版本 下载完毕后,放入到我们的elasticsearch/pl 阅读全文
posted @ 2021-01-03 21:42 HaimaBlog 阅读(194) 评论(0) 推荐(0)
摘要: 一. 前序 sh Elasticsearch是一个基于Apache Lucene(TM)的开源搜索引擎。无论在开源还是专有领域,Lucene 可以被认为是迄今为止最先进、性能最好的、功能最全的搜索引擎库。 但是,Lucene只是一个库。想要 使用它,你必须使用Java来作为开发语言并将其直接集成到你 阅读全文
posted @ 2021-01-03 16:27 HaimaBlog 阅读(211) 评论(0) 推荐(0)
摘要: docker-compose安装EFK git clone https://github.com/haimait/docker_compose_efk docker-compose up -d Fluentd # 日志收集 Elasticsearch # 数据库 Kibana # 图形管理系统 ## 阅读全文
posted @ 2021-01-03 15:11 HaimaBlog 阅读(150) 评论(0) 推荐(0)
摘要: 参考 docker_compose_efk elasticsearch、kibana、filebeat https://github.com/haimait/docker_compose_efk docker-compose 一键部署elasticsearch、kibana、filebeat htt 阅读全文
posted @ 2020-12-29 19:25 HaimaBlog 阅读(439) 评论(0) 推荐(0)
摘要: 分区类型: 分区方法一 分区方法二 文件系统类型 EXT2 EXT3 EXT4 阅读全文
posted @ 2020-12-27 22:13 HaimaBlog 阅读(72) 评论(0) 推荐(0)
摘要: https://www.jb51.net/softjc/29947.html 阅读全文
posted @ 2020-12-25 18:29 HaimaBlog 阅读(321) 评论(0) 推荐(0)
摘要: https://blog.csdn.net/alex_yangchuansheng/article/details/103343697 https://blog.csdn.net/liumiaocn/article/details/109385231 阅读全文
posted @ 2020-12-25 10:59 HaimaBlog 阅读(193) 评论(0) 推荐(0)
摘要: 参考: https://blog.csdn.net/qq_35641923/article/details/86493822 https://www.runoob.com/ruby/ruby-installation-unix.html https://www.jianshu.com/p/1fbbc 阅读全文
posted @ 2020-12-24 15:24 HaimaBlog 阅读(1256) 评论(0) 推荐(0)
摘要: 有关用户登录的信息记录在 utmp(/var/run/utmp)、wtmp(/var/log/wtmp)、btmp(/var/log/btmp) 和 lastlog(/var/log/lastlog) 等文件中。 who、w 和 users 等命令通过 utmp(/var/run/utmp) 文件查 阅读全文
posted @ 2020-12-23 09:35 HaimaBlog 阅读(448) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 10 ··· 15 下一页