小编spu*_*der的帖子

是.yaml还是.yml?

根据yaml.org,官方文件扩展名是.yaml.

引用:

是否有YAML文件的官方扩展名?

请尽可能使用".yaml".

然而,在互联网上似乎存在对使用扩展的分歧.如果您在Web上查找示例,其中许多使用未经批准的.yml扩展.

对于较短的搜索结果,搜索Google的结果将近3倍.


在此输入图像描述
49,100


在此输入图像描述
15400


我应该使用哪个?创作者建议的正确的4个字母扩展名,或者在互联网的狂野西部发现的3个字母的扩展名?

yaml configuration-files app.yaml

281
推荐指数
4
解决办法
10万
查看次数

你能从Influxdb中删除数据吗?

如何从Influxdb中删除数据?

文档显示它应该像下面这样简单:

delete from foo where time < now() -1h
Run Code Online (Sandbox Code Playgroud)

出于某种原因,Influxdb拒绝我的删除语句说"删除查询不能有where子句不引用时间"

select * from bootstrap where duration > 1000 and time > 14041409940s and time < now()
Run Code Online (Sandbox Code Playgroud)

我想删除持续时间> 1000秒的这5个条目

在此输入图像描述

这应该是一个有效的sql语句,但它失败了

在此输入图像描述

这些删除语句都不起作用

delete from bootstrap where duration > 3000000"

delete from bootstrap where duration > 300000"

delete from bootstrap where time = 1404140994043"

delete from bootstrap where duration > 300000 and time > 1404141054508 "

delete from bootstrap where duration > 300000 and time > 1404141054508s "

delete from bootstrap where …
Run Code Online (Sandbox Code Playgroud)

sql influxdb

45
推荐指数
5
解决办法
8万
查看次数

为什么查询电话= N'1234'慢于电话='1234'?

我有一个varchar字段(20)

执行此查询时,它很快(使用索引查找):

SELECT * FROM [dbo].[phone] WHERE phone = '5554474477'
Run Code Online (Sandbox Code Playgroud)

但这个很慢(使用索引扫描).

SELECT * FROM [dbo].[phone] WHERE phone = N'5554474477'
Run Code Online (Sandbox Code Playgroud)

我猜测如果我将字段更改为nvarchar,那么它将使用Index Seek.

sql sql-server query-performance

45
推荐指数
3
解决办法
3946
查看次数

logstash检查字段是否存在

我有日志文件进入ELK堆栈.我想复制一个字段(foo)以便在其上执行各种突变,但是字段(foo)并不总是存在.

如果foo不存在,则仍会创建bar,但会为其分配文字字符串 "%{foo}"

如果字段存在,我怎样才能执行变异?

我正在尝试做这样的事情.

if ["foo"] {
  mutate {
    add_field => "bar" => "%{foo}
  }
}
Run Code Online (Sandbox Code Playgroud)

logstash logstash-configuration

38
推荐指数
4
解决办法
6万
查看次数

如何将项目添加到.dockerignore?

我无法找到许多.dockerignore文件应该是什么样子的例子.

使用puppet在docker容器上安装一些软件包会导致映像从600MB扩展到3GB.我正在尝试使用.dockerignore文件将大小保持为最小值

$ cat Dockerfile  
FROM centos:centos6

#Work around selinux problem on cent images
RUN yum install -y --enablerepo=centosplus libselinux-devel

RUN yum install -y wget git tar openssh-server; yum -y clean all

Add Puppetfile / 
RUN librarian-puppet install
RUN puppet apply --modulepath=/modules -e "class { 'buildslave': jenkins_slave => true,}"
RUN librarian-puppet clean
Run Code Online (Sandbox Code Playgroud)

如果我跑,docker images --tree我可以看到图像瞬间增长几GB

$ docker images --tree
                ??e289570b5555 Virtual Size: 387.7 MB
                ? ??a7646acf90d0 Virtual Size: 442.5 MB
                ?   ??d7bc6e1fbe43 Virtual Size: 442.5 MB …
Run Code Online (Sandbox Code Playgroud)

puppet docker

29
推荐指数
4
解决办法
4万
查看次数

无法安装hubot - 无法满足npm依赖性

在尝试部署hubot时,npm一直在抱怨未满足的依赖关系.该文档没有解释如何解决这个问题.

yum install npm --enablerepo=epel
yum install nodejs --enablerepo=epel
cd /opt
git clone https://github.com/github/hubot.git
cd hubot/
./bin/hubot --create acebot
npm install -g hubot coffee-script
...

npm http 200 https://registry.npmjs.org/formidable/-/formidable-1.0.14.tgz
npm http 200 https://registry.npmjs.org/uid2/-/uid2-0.0.2.tgz
/usr/bin/hubot -> /usr/lib/node_modules/hubot/bin/hubot
npm WARN unmet dependency /usr/lib/node_modules/block-stream requires inherits@'~2.0.0' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
npm WARN unmet dependency /usr/lib/node_modules/fstream requires inherits@'~2.0.0' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is …
Run Code Online (Sandbox Code Playgroud)

hubot

19
推荐指数
1
解决办法
9365
查看次数

git pull给出错误:访问https://git.foo.com/bar.git时需要401授权

我的macbook pro能够从公司的git服务器克隆/推/拉.我的6.3分vm得到401错误

git clone https://git.acme.com/git/torque-setup
"error: The requested URL returned error: 401 Authorization Required while accessing https://git.acme.com/git/torque-setup/info/refs
Run Code Online (Sandbox Code Playgroud)

作为一种解决方法,我尝试创建一个具有空存储库的文件夹,然后将远程设置为公司服务器.我在尝试git pull时遇到同样的错误

机器之间的遥控器是相同的

MacBook Pro(正常工作)

git --version
git version 1.7.10.2 (Apple Git-33)

git remote -v
origin  https://git.acme.com/git/torque-setup (fetch)
origin  https://git.acme.com/git/torque-setup (push)
Run Code Online (Sandbox Code Playgroud)

6.3分(不工作)

yum install -y git

git --version
git version 1.7.1

git remote -v
origin  https://git.acme.com/git/torque-setup (fetch)
origin  https://git.acme.com/git/torque-setup (push)
Run Code Online (Sandbox Code Playgroud)


git服务器只允许https.不是git或ssh连接.

为什么macbook pro能够做git pull,而cent os机器不能?


解决方案更新2013-5-15

正如jku所提到的,罪魁祸首是安装在分箱上的旧版git.不幸的是,1.7.1是你跑步时得到的yum install git

解决方法是手动安装较新版本的git,或者只是将用户名添加到repo

git clone https://joe@git.acme.com/git/torque-setup
Run Code Online (Sandbox Code Playgroud)

git

18
推荐指数
1
解决办法
4万
查看次数

elasticsearch/kibana错误"数据太大,[@timestamp]的数据会大于限制

在我的测试ELK群集上,我在尝试查看上周的数据时遇到以下错误.

Data too large, data for [@timestamp] would be larger than limit
Run Code Online (Sandbox Code Playgroud)

关于分片失败的警告似乎是误导性的,因为elasticsearch监视工具kopfhead显示所有分片都正常工作,弹性簇是绿色的.

在此输入图像描述

用于弹性搜索的google组中的一个用户建议增加内存.我已将3个节点增加到8GB,每个节点有4.7GB堆,但问题还在继续.我每天产生大约5GB到25GB的数据,保留30天.

elasticsearch kibana kibana-4

17
推荐指数
3
解决办法
1万
查看次数

Git - 你能找到客户用来推送的东西吗?

有多种方法可以提交和推送git提交.

  • 命令行
  • 浏览器编辑器(github,gitlab)
  • sourcetree(更新:sourcetree 支持--signoff)
  • github桌面

通过查看github上的repo的公共历史,有没有办法确定使用命令行与git gui工具进行的git提交的百分比是多少?

推理

我们正试图确定授权用户提交git commit --signoff(而不是贡献者许可协议)是多么有害.没有git gui工具我找到了支持--signoff

git

14
推荐指数
1
解决办法
92
查看次数

带有校验和的Artifactory上传

如果您将工件上载到Artifactory并且不提供校验和,则会发出以下警告:

截图,Artifactory,Fix Checksum

你如何上传curl并包含校验和?

curl checksum artifactory

12
推荐指数
2
解决办法
5924
查看次数