This file contains hidden or 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
iptables -A INPUT -s <ip-address> -p tcp --destination-port 27017 -m state --state NEW,ESTABLISHED -j ACCEPT | |
iptables -A OUTPUT -d <ip-address> -p tcp --source-port 27017 -m state --state ESTABLISHED -j ACCEPT |
This file contains hidden or 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
// สลับไป develop | |
git checkout develop | |
// merge branch ของเราเข้าไป | |
git merge –no-ff <name> | |
// เสร็จแล้วก็ลบทิ้ง | |
git branch -d <name> |
This file contains hidden or 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
// สร้าง branch จาก branch ที่เราอยู่ในัจจุบัน | |
git branch feature/<name> | |
// สลับไป branch สร้าง | |
git checkout feature/<name> |
This file contains hidden or 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
// เปลี่ยนไปอยู่ master ก่อน | |
git checkout master | |
// ทำการ merge โค้ดเข้าไปใน master | |
git merge --no-ff hotfix/create-post-error-0.2.1 | |
// ติดเลขเวอร์ชั่นเพื่อเตือนความจำ | |
git tag -a 0.2.1 | |
-------------------------------------------------- |
This file contains hidden or 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
// ถ้าเราอยู่ใน master แล้วก็สั่ง | |
git checkout -b hotfix/create-post-error-0.2.1 | |
// หรือถ้าอยู่ branch อื่นๆ ก็พิมพ์ตามคำสั่งด้านล่าง | |
git checkout -b hotfix/create-post-error-0.2.1 master |
This file contains hidden or 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
// เปลี่ยนไปอยู่ master ก่อน | |
git checkout master | |
// ทำการ merge โค้ดเข้าไปใน master | |
git merge --no-ff release/release-0.2 | |
// ติดเลขเวอร์ชั่นเพื่อเตือนความจำ | |
git tag -a 0.2 | |
-------------------------------------------------- |
This file contains hidden or 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
// ถ้าเราอยู่ใน develop แล้วก็สั่ง | |
git checkout -b realease/release-0.2 | |
// หรือถ้าอยู่ branch อื่นๆ ก็พิมพ์ตามคำสั่งด้านล่าง | |
git checkout -b realease/release-0.2 develop |
This file contains hidden or 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
// ถ้าเราอยู่ใน develop แล้วก็สั่ง | |
git checkout -b feature/hello-world | |
// หรือถ้าอยู่ branch อื่นๆ ก็พิมพ์ตามคำสั่งด้านล่าง | |
git checkout -b feature/hello-world develop |
This file contains hidden or 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 service ps mysite | |
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR | |
ad0lvaxnsbgcirz5botfle2k3 mysite.1 wordpress ubuntu-node01 Running Running 7 minutes ago | |
3w6vx7b5kbykgmnpl4n3xgz95 mysite.2 wordpress ubuntu-node02 Running Running less than a second ago | |
btjrw6f33rud9vh6wa4pinzhj mysite.3 wordpress ubuntu-node03 Running Preparing 28 seconds ago | |
ab1p9p075zvwlb3t1g5f1n8ww mysite.4 wordpress ubuntu-node04 Running Preparing 28 seconds ago |
This file contains hidden or 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
function foo() { | |
console.log( this.a ); | |
} | |
var a = 2; | |
foo(); // 2 |