[ php ] Warning: POST Content-Length of 8456656 bytes exceeds the limit of 8388608 bytes in Unknown on line 0

find which PHP configuration to use

phpinfo();

/etc/php/7.0/apache2/php.ini

/etc/php/7.0/fpm/php.ini

post_max_size = 8M

upload_max_filesize = 2M

ref : https://stackoverflow.com/questions/11719495/php-warning-post-content-length-of-8978294-bytes-exceeds-the-limit-of-8388608-b

[ git ] command

View current branch

$ git branch
version_1_0_11
* version_1_0_12

The one with the * is the current branch.

 

Git remove all files and directories in current directory

$ git rm -r *

 

Git log

$ git log

 

Git diff head

$ git diff HEAD

 

กู้ไฟล์ที่ถูกลบ

$ git checkout index.html

กู้ไฟล์ที่ถูกลบที่เผลอ commit ไปยัง stage

$ git reset index.html

 

 

[ mailchimp ] special link

View in browser

a href="*|ARCHIVE|*"

ref : https://mailchimp.com/help/add-a-campaign-page-link-to-your-email-campaign/

Unsubscribe button

a href="*|UNSUB|*"

Recipient email

This message was sent to *|EMAIL|*

Title

title>*|MC:SUBJECT|*/title>

Create Regular Campaign

https://mailchimp.com/help/create-a-regular-email-campaign/

Create mail from RSS feed

https://mailchimp.com/help/share-your-blog-posts-with-mailchimp/

Inbox preview tool

https://mailchimp.com/help/test-with-inbox-preview/

[ aws ] S3 CLI

Installation

pip install awscli

aws installation path:

/home/username/.local/bin/aws

 

~/.bashrc

export PATH=$PATH:/home/pong/.local/bin

 

s3 ls

aws s3 ls s3://mybucket

s3 sync public read

aws s3 sync . s3://my-bucket/path --acl public-read

[ docker ] couchbase

1) Create Couchbase “master” service

command

docker service create
--name couchbase-master
--replicas 1
-p 8091:8091
-e TYPE=MASTER
arungupta/couchbase

or compose file

version: '3'

services:
  couchbase-master:
    image: arungupta/couchbase
    deploy:
      replicas: 1
    ports:
      - 8091:8091

test the compose file

docker compose up

list services

docker service ls

2) Create Couchbase “worker” service

create network

docker network create
-d overlay
couchbase

create worker

docker service create
--name couchbase-worker
--replicas 1
--network couchbase
-e TYPE=WORKER
-e COUCHBASE_MASTER=couchbase-master.couchbase
-e AUTO_REBALANCE=false
arungupta/couchbase

TYPE=WORKER, COUCHBASE_MASTER=couchbase-master.couchbase

or compose file

version: '3'

services:
  couchbase-master:
    image: arungupta/couchbase
    networks:
      - couchbase-network
    deploy:
      replicas: 1
    ports:
      - 8091:8091

  couchbase-worker:
    image: arungupta/couchbase
    deploy:
      replicas: 1
    networks:
      - couchbase-network
    environment:
      TYPE: 'WORKER'
      COUCHBASE_MASTER: 'couchbase-master'
      AUTO_REBALANCE: 'false'

networks:
  couchbase-network:
    driver: overlay

test the compose file

docker compose up

3) Scale another WORKER

docker service scale couchbase-worker=2

or using docker compose

docker-compose scale couchbase-worker=2

 

Test

Enter Coughbase web console to see MASTER, WORKER, WORKER : http://localhost:8091/

username : Administrator

password : password

Way 2 : using couchbase official docker image

TBD

ref : https://blog.couchbase.com/couchbase-cluster-docker/,

https://blog.couchbase.com/couchbase-using-docker-compose/,

https://github.com/arun-gupta/docker-images/blob/master/couchbase/docker-compose-worker.yml

[ react-jw-player ] A React Component API for JW Player

ReactJWPlayer
{...videoProps}
playerId={this.playerId}
playerScript={playerScriptUrl}
customProps={{
skin: PLAYER_SKIN,
// related: {
// file: playerRelateUrl,
// oncomplete: 'autoplay',
// autoplaytimer: '0',
// },
}}
// event hooks
onAdPlay={this.onAdPlay}
onPlay={this.showFBShare}
onReady={this.addExtras}
onFirstFrame={this.removeControls}
onDisplayClick={this.onDisplayClick}
onSetupError={this.onSetupError}
onError={this.onError}

playerId :
playerScript :
customProps : containing properties to be applied directly to the JW Player instance.
Add anything in the API, like skins, into this object. customProps={{ skin: { name: 'six' } }}[/code]

 

ref : https://github.com/micnews/react-jw-player