我正试图在我的Vagrant机器上获得对augeas的支持.
我尝试使用这些指令安装一些包:
package { "augeas-tools": ensure => installed }
package { "libaugeas-dev": ensure => installed }
package { "libaugeas-ruby": ensure => installed }
Run Code Online (Sandbox Code Playgroud)
当我尝试在我的清单上使用augeas时,在vm启动后我收到此错误:
err: Could not find a suitable provider for augeas
Run Code Online (Sandbox Code Playgroud)
我正在使用带有Vagrant 1.0.3的exact32官方框.
Vagrant 1.0.3有红宝石1.8.7和木偶2.7.14
$ ruby -v
$ ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-linux]
$ puppet help
$ Puppet v2.7.14
Run Code Online (Sandbox Code Playgroud)
这是我的php类的小清单,包含在apache类,mysql和其他类单独测试之后.除了augeas命令外,一切正常.
class php {
exec { "apt-update":
command => "/usr/bin/apt-get update",
refreshonly => true;
}
package { "augeas-tools": ensure => installed …Run Code Online (Sandbox Code Playgroud) 我经历过一种让我疯狂的行为,我无法解决它.
我有一个脚本打开一些mysql连接并将它们存储在一个数组中.为了防止MySQL关闭未使用的连接(该进程应该全天候运行),我使用setInterval频繁地触发pingSync().这种方法在我的另一个项目中已经工作了好几个月,但是在节点为0.8.14的新主机上,这种行为很奇怪.
setInterval(function () {
var count = 0;
console.log('---------------------------------------------------------');
console.log('Length: ');
console.log(connections.length);
connections.forEach(function(connection){
var res = connection.pingSync();
console.log('PING mysql '+count+ ' / '+(new Date().getTime()));
console.log(res);
count++;
});
console.log('---------------------------------------------------------');
}, 50000);
Run Code Online (Sandbox Code Playgroud)
预期结果:
---------------------------------------------------------
Length:
4
PING mysql 0 / 1351603868929
true
PING mysql 1 / 1351603868929
true
PING mysql 2 / 1351603868929
true
PING mysql 3 / 1351603868929
true
---------------------------------------------------------
Run Code Online (Sandbox Code Playgroud)
我得到的结果:
#1
---------------------------------------------------------
Length:
4
PING mysql 0 / 1351603868929
true
4
PING mysql 0 / 1351603868929
true
PING mysql …Run Code Online (Sandbox Code Playgroud) 我似乎无法与我合作.
这是我config.yml文件中的资产配置
assetic:
debug: "%kernel.debug%"
use_controller: false
bundles: [ FOSUserBundle, MyUserBundle ]
filters:
cssrewrite: ~
Run Code Online (Sandbox Code Playgroud)
我创建了一个扩展FOSUserBundle的包.我已经覆盖了注册模板,并试图包含我自己的CSS.
// MyUserBundle/Resources/views/Registration/register_content.html.twig
{% block stylesheets %}
{% stylesheets 'bundles/myuser/css/*' filter='cssrewrite' %}
<link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}
{% endblock %}
Run Code Online (Sandbox Code Playgroud)
我的包具有以下结构:
/MyUserBundle
...
/Resources
...
/public
/css
signup.css
Run Code Online (Sandbox Code Playgroud)
我总是得到404.
http://myproject.dev/css/494d9ed_part_1_signin_1.css 404 Not Found.
我抛出以下异常:
No route found for "GET /css/494d9ed_part_1_signin_1.css"
我已经发布了资产,所以它也存在
/MyProject
/web
/bundles
/myuser
/css
signin.cssRun Code Online (Sandbox Code Playgroud)
我究竟做错了什么?
我无法下载与作曲家的github私人回购
php composer.phar update
Run Code Online (Sandbox Code Playgroud)
我收到以下错误
无法下载" https://api.github.com/repos/company/private1 "文件(未找到HTTP/1.1 404)
但我可以轻松下载这些私人回购使用 git clone
Composer.json
"repositories": [
{
"type": "vcs",
"url": "git@github.com:company/private1.git",
"options": {
"ssh2": {
"username": "githubusername",
"pubkey_file": "/home/username/.ssh/id_rsa.pub",
"privkey_file": "/home/username/.ssh/id_rsa"
}
}
},
{
"type": "vcs",
"url": "git@github.com:company/private2.git",
"options": {
"ssh2": {
"username": "githubusername",
"pubkey_file": "/home/username/.ssh/id_rsa.pub",
"privkey_file": "/home/username/.ssh/id_rsa"
}
}
}
],
"require": {
"php": ">=5.4.3",
"zendframework/zendframework": ">2.1.3",
"doctrine/mongodb-odm": "dev-master",
"doctrine/doctrine-mongo-odm-module": "dev-master",
"company/private": "dev-master",
"company/private2": "dev-master"
}
Run Code Online (Sandbox Code Playgroud)
我试过这个,但它不起作用
SSH2 PECL也启用了.
我还创建了配置文件 vim ~/home/.ssh/config
具有以下细节
host www.github.com
User githubusername …Run Code Online (Sandbox Code Playgroud) 我正在使用Sonata Media Bundle,我需要为图像缩放器编写特定的行为,因为默认的SimpleResizer和SquareResizer类不符合我的需要.
我想要一个简单的图像缩放器,如果我同时指定width和height参数,我可以准确地调整图像大小.我还希望如果我没有指定参数,它可以回退简单的缩放器行为height.
我刚刚搜索了文档,但我找不到解决方案.
我正在使用以下Avro模式:
Price-state.avsc
{
"namespace": "com.company.model",
"name": "Product",
"type": "record",
"fields": [
{
"name": "product_id",
"type": "string"
},
{
"name": "sale_prices",
"type": {
"name": "sale_prices",
"type": "record",
"fields": [
{
"name": "default",
"type": {
"name": "default",
"type": "record",
"fields": [
{
"name": "order_by_item_price_by_item",
"type": [
"null",
{
"name": "markup_strategy",
"type": "record",
"fields": [
{
"name": "type",
"type": {
"name": "type",
"type": "enum",
"symbols": ["margin", "sale_price"]
}
}
]
}
]
},
{"name": "order_by_item_price_by_weight", "type": ["null", "string"]},
{"name": "order_by_weight_price_by_weight", "type": ["null", "string"]} …Run Code Online (Sandbox Code Playgroud) 是否有可能获得一个完整的例子,说明如何配置Monolog以使用Symfony 2.6和Doctrine 2将其日志存储到MongoDB中?
php ×3
symfony ×3
assetic ×1
augeas ×1
avro ×1
avro-tools ×1
composer-php ×1
doctrine-odm ×1
doctrine-orm ×1
git ×1
github ×1
mongodb ×1
monolog ×1
mysql ×1
node.js ×1
puppet ×1
ssh ×1
vagrant ×1