我很难module/awsm.json融入我的行列resources-cf.json.我正在尝试的任何东西都不会合并它们.这是我的步骤
jaws project createcd new-project-namejaws module create greetings hellogreetings/awsm.json添加LambdaIamPolicyDocumentStatements和资源.类似于https://github.com/dekz/awsm-users/blob/master/awsm.json." jaws deploy resources"不会更新云的形成并产生 -
JAWS: Resources Deployer "dev": Deploying resources to region "us-west-2"...
JAWS: Resources Deployer "dev - us-west-2": Performing Cloudformation stack update. This could take a while depending on how many resources you are updating...
JAWS: Resources Deployer "dev - us-west-2": Cloud formation stack update failed because of the following error...
{ [ValidationError: No updates …Run Code Online (Sandbox Code Playgroud) 我的情况如下:
例如,我有一个网站http://www.example.com,我已经建立了几个子域,例如http://video.example.com,http://image1.example.com,http://image2.example.com.在Apache虚拟主机设置中,它们使用相同的文件夹(例如/home/example/).(这两个域使用mod_cband具有不同的带宽设置).
我有一个子文件夹/home/example/files/videos,我想让它只能从子域访问,http://video.example.com/files/videos/但不能从http://www.example.com/files/videos/或从任何其他子域访问.
我该如何配置.htaccess文件?
构建一个时Dockerfile,我经常允许在构建时配置参数,以便只容易配置稍微不同的容器.为实现这一点,我使用了ENV与用户可定义ARG的结合的变量的默认值.Dockerfile快速测试的示例:
FROM busybox
ARG FLAGS
ENV FLAGS ${FLAGS:-}
RUN echo "${FLAGS}"
Run Code Online (Sandbox Code Playgroud)
这可以像这样使用:
docker build --build-arg FLAGS="foo --remove-me" -t <imagename>:<tag> .
Run Code Online (Sandbox Code Playgroud)
现在我发现自己处于这样的情况:我确实想要--remove-me从我允许运行的命令中主动删除特定标志(在上面的示例中: )(由于一年多以来没有修复的错误).虽然我知道如何在其他情况下删除标志:
LC_ALL=C sed -e 's/ --remove-me//'
Run Code Online (Sandbox Code Playgroud)
我面临的问题是我不知道如何管道和删除标志.我知道我可以在使用时执行此操作RUN,但是我必须在sed每个RUN语句上重复使用上述内容,因此不能使其重复.
我正在寻找一种从子类自动神奇地调用父类构造函数(?)的方法:
(注意:这只是一个示例,因此可能存在输入错误)
Class myParent()
{
protected $html;
function __construct( $args )
{
$this->html = $this->set_html( $args );
}
protected function set_html( $args )
{
if ( $args['foo'] === 'bar' )
$args['foo'] = 'foobar';
return $args;
}
}
Class myChild extends myParent
{
public function do_stuff( $args )
{
return $this->html;
}
}
Class myInit
{
public function __construct( $args )
{
$this->get_stuff( $args );
}
public function get_stuff( $args )
{
$my_child = new myChild();
print_r( $my_child->do_stuff( $args ) ); …Run Code Online (Sandbox Code Playgroud) 我有一张不会显示的Google地图.问题在FF和Chrome中似乎是相同的,但在IE中更为"糟糕"(总是最新版本).
在FF和Chrome中,我遇到了position: relative;css元素样式的问题.一旦切换到(使用开发工具),position: absolute(or: fixed);一切都在FF中显示正常.在Chrome中,地图仅显示上限30%(从顶部开始).
在IE中,地图甚至没有加载.
这是来自的脚本<head>.内容仅用于测试,并不代表任何内容.
注意:我只使用它来加载地图.这将在稍后交换.
<!-- Script inside <head> tag -->
<script type="text/javascript" src="http://maps.google.com/maps/api/js?
file=api&
v=2&
key=<?php echo self::GOOGLE_API_KEY; ?>&
sensor=false">
</script>
<script type="text/javascript">
function initialize()
{
var startpos = new google.maps.LatLng( 50.978056,11.029167 );
var ops = {
zoom: 6
,center: startpos
,mapTypeId:
google.maps.MapTypeId.ROADMAP
,tileSize: new google.maps.Size( 256, 256 )
}
var map = new google.maps.Map( document.getElementById("map_canvas"), ops );
var pos1 = new google.maps.LatLng( 50.7510776,12.4820724 );
var contentString1 = '<div align="left" …Run Code Online (Sandbox Code Playgroud) 我正在使用传单/ OSM来获取网站上的小地图.站点本身可通过HTTPS访问,而传单库(afaik)只能通过HTTP连接检索.现在,Chrome不包含该库,并在控制台中显示以下消息:
Run Code Online (Sandbox Code Playgroud)[blocked] The page at https://example.com/foo/bar ran insecure content from http://cdn.leafletjs.com/leaflet-0.5/leaflet.css_
知道如何解决这个问题吗?
docker version 1.9.1
swarm version 1.0.1
Run Code Online (Sandbox Code Playgroud)
为什么要将3个VM(桥接网)连接到swarm."docker info"显示了所有节点
状态待定.
3个主机中的1个是管理器,所有输出都来自该主机.我不知道在哪里寻找.
在跑步 swarm --debug manage token://XXXXX
输出>>
*INFO[0000] Listening for HTTP addr=127.0.0.1:2375 proto=tcp
DEBU[0000] Failed to validate pending node: Cannot connect to the docker engine endpoint Addr=10.32.1.38:2375
DEBU[0000] Failed to validate pending node: Cannot connect to the docker engine endpoint Addr=10.32.1.4:2375
DEBU[0000] Failed to validate pending node: Cannot connect to the docker engine endpoint Addr=10.32.1.33:2375
Run Code Online (Sandbox Code Playgroud)
然后
root@ubuntu:~# ps -ef | grep swarm
root 2158 1391 0 12:28 pts/2 00:00:00 …Run Code Online (Sandbox Code Playgroud) 我设置了一个 debian 服务器,在其中安装了 docker 和 docker-compose。
我在 sudo 用户的家中创建了一个具有以下层次结构的文件夹:
~/docker-project
- docker-compose.yml
- /traefik/traefik.toml
Run Code Online (Sandbox Code Playgroud)
我做了docker-compose up -d一切都开始了我可以访问 traefik.mydomain.com 与其他子域一样具有有效的 ssl 证书。但是,如果我转到我的任何子域以访问我的 dockerized Web 服务,我会在浏览器中收到一条错误的网关消息。如果我转到我的服务器 IP 地址并输入正确的端口,我会看到我的网络服务运行良好。
所以我想我在配置 docker / traefik 关系时犯了一个错误,但我找不到在哪里。
这是我的traefik.toml:
defaultEntryPoints = ["http", "https"]
################################################################
# Web configuration backend
################################################################
[web]
address = ":8080"
[web.auth.basic]
# User: user | Password: password
users = ["user:hashedpassword"]
################################################################
# Entry-points configuration
################################################################
[entryPoints]
[entryPoints.http]
address = ":80"
[entryPoints.http.redirect]
entryPoint = "https"
[entryPoints.https]
address = ":443" …Run Code Online (Sandbox Code Playgroud) 对于我正在构建的git日志查看器,我只是查看git log输出并且想知道三件事.由于没有关于Git SCM书中的确切输出和类似资源的文档,我不得不问SO:
index 1234567..1234567 123456?它与提交不符sha?@@ -40,20 +40,20 @@?@@更改后的第二行之后的部分是什么?示例,取自Git SCM Book "查看提交历史"
$ git log -p -2
commit ca82a6dff817ec66f44342007202690a93763949
Author: Scott Chacon <schacon@gee-mail.com>
Date: Mon Mar 17 21:52:11 2008 -0700
changed the version number
diff --git a/Rakefile b/Rakefile
index a874b73..8f94139 100644
--- a/Rakefile
+++ b/Rakefile
@@ -5,5 +5,5 @@ require 'rake/gempackagetask'
spec = Gem::Specification.new do |s|
s.name = "simplegit"
- s.version = "0.1.0"
+ s.version = …Run Code Online (Sandbox Code Playgroud) 我试图创建一个"虚拟"文件,而不使用内存或临时文件."虚拟"文件需要通过检查,file_exists()同时与requireor 一起使用时不会抛出任何错误或警告include.
允许您实现自己的协议处理程序和流,以便与所有其他文件系统功能(例如
fopen(),fread()等)一起使用.
......其中file_exists()一个是哪里.文档页面指出:
从PHP 5.0.0开始,此函数也可以与某些URL包装器一起使用.请参阅支持的协议和包装器以确定哪些包装器支持
stat()一系列功能.
我的尝试是构建一个自定义的虚拟文件包装器
class VirtualFileWrapper
{
public $context;
public function stream_open( $path, $mode, $options, &$opened_path )
{
return TRUE;
}
public function stream_stat()
{
var_dump( __METHOD__ );
$data = [
'dev' => 0,
'ino' => getmyinode(),
'mode' => 'r',
'nlink' => 0,
'uid' => getmyuid(),
'gid' => getmygid(),
'rdev' => 0,
'size' => 0,
'atime' => …Run Code Online (Sandbox Code Playgroud) docker ×3
php ×2
.htaccess ×1
apache ×1
constructor ×1
docker-swarm ×1
filestream ×1
git ×1
git-log ×1
google-maps ×1
javascript ×1
leaflet ×1
oop ×1
shell ×1
stream ×1
traefik ×1