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
一般Dockfile是不是只建議寫一個指令 | |
那像如果要部署一個測試環境,需要有nginx、redis、php、phpunit是不是都另外寫多支dockerfile | |
再用link方式連結各項服務 | |
之後再用docker compose 去部署 |
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
好像都卡在 build nginx | |
環境是用 | |
Linux main 3.13.0-46-generic #77-Ubuntu SMP Mon Mar 2 18:23:39 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux | |
用vagrant ssh 登入之後 | |
cd 到 build-dev 目錄 執行 docker-compose up | |
下載完畢之後,然後就一直hang在 | |
Attaching to builddev_nginx_1 | |
我的docker-compose.yml 長這樣 | |
[code] |
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
我透過docker-compose 安裝mongodb | |
腳本如下: | |
mongo: | |
image: aloha1003/mongo:latest | |
ports: | |
- "27017:27017" | |
- "28017:28017" | |
volumes: | |
- "/Volumes/MACOS/mongodb/var/mongodb:/srv/mongodb" | |
- "/Volumes/MACOS/log/mongodb:/var/log/mongodb" |
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
/* | |
* Append this to the end of your application/config.php | |
*/ | |
spl_autoload_extensions('.php'); // Only Autoload PHP Files | |
spl_autoload_register('my_autoload'); | |
function my_autoload($classname) | |
{ | |
$autoLoadDirAry = array( | |
APPPATH . 'libraries/', |
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
server { | |
listen 8080 ; | |
location /py/ { | |
access_log /var/log/nginx/py-access.log; | |
error_log /var/log/nginx/py-error.log error; | |
include /etc/nginx/uwsgi_params; | |
uwsgi_modifier1 9; | |
uwsgi_pass 127.0.0.1:9090; | |
} |
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
var LINE = require('./line.js'); | |
var line = new LINE(); | |
var email = 'your email'; | |
var password = 'your password'; | |
line.login(email, password, function(error, result) { | |
if (error) { | |
return; | |
} |
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
### USAGE | |
### | |
### ./ElasticSearch.sh 1.5.0 will install Elasticsearch 1.5.0 | |
### ./ElasticSearch.sh 1.4.4 will install Elasticsearch 1.4.4 | |
### ./ElasticSearch.sh will fail because no version was specified (exit code 1) | |
### | |
### CLI options Contributed by @janpieper | |
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch | |
### ElasticSearch version |
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
1. find and add contacts by email or phone number (Important) | |
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
<div class="areaA"> | |
<select ng-model="areaACountry" ng-options="citys for (citys, areaACountry) in zipCodes" ></select> | |
<select ng-model="areaATown" | |
ng-options="areas for (areas, zipcode) in areaACountry" ></select> | |
</div> | |
<div class="areaB"> | |
<input type="checkbox" id="areaBAsAreaA" ng-checked="areaBAsAreaA()" />與AreaA相同內容<br /> | |
<select ng-model="areaBCountry" ng-options="citys for (citys, areaBCountry) in zipCodes" ></select> | |
<select ng-model="areaBTown" | |
ng-options="areas for (areas, zipcode) in areaBCountry" ></select> |
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
use \App\Model\ObjectForTest as ObjectForTest; | |
class Main() { | |
function test() { | |
$ary = []; | |
array_map(array('ObjectForTest', 'fun'), $ary); //回報錯誤 | |
array_map(array('\App\Model\ObjectForTest', 'fun'), $ary); //正常 | |
} | |
} |
OlderNewer