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
| "index": { | |
| "analysis": { | |
| "analyzer": { | |
| "lala_analyzer": { | |
| # "tokenizer": "vi_tokenizer", | |
| "tokenizer": "standard", | |
| "char_filter": ["html_strip"], | |
| "filter": [ | |
| "icu_folding" | |
| ] |
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
| #!/usr/bin/env bash | |
| # install awscli | |
| python2 -m pip install awscli | |
| # create aws sym link if any issue | |
| ln -s /usr/local/bin/aws /var/awslogs/bin/aws | |
| # install awscli-cwlogs |
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
| aws s3 ls source-bucket-name - recursive | grep -E "\w+\.+" | awk -F" " '{for(i=4; i<=NF; i++){printf "s3://%s", $i}; printf "\n"}' | head -n5 | xargs -I$ aws s3 cp $ s3://destination-bucket-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
| ## sudo without pwd | |
| ``` | |
| longka ALL=(ALL) NOPASSWD: ALL | |
| %sudo ALL=(ALL:ALL) NOPASSWD: ALL | |
| ``` | |
| -- | |
| ## disable ssh with pass |
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
| server { | |
| root /home/thixanvat/prod/web; | |
| server_name thixanvat.com www.thixanvat.com; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| proxy_set_header Host $http_host; | |
| proxy_set_header X-NginX-Proxy true; | |
| location /assets/ { |
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
| PYTHONPATH=. python test/test.py |
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
| rewrite ^/blog/wp-admin/$ /blog/wp-admin/options-general.php permanent; | |
| rewrite ^/blog/(.*)/$ /blog/index.php?$1 last; |
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
| server { | |
| root /home/example/stag/web; | |
| server_name stag-web.example.vn www.stag-web.example.vn; | |
| location /assets/ { | |
| alias /home/example/stag/web/build/public/assets/; | |
| add_header Cache-Control public; | |
| } | |
| location /blog { |
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
| from app import log | |
| logger = log.get_logger() | |
| class BookingResource(object): | |
| def __init(self): | |
| pass | |
| def on_put(self, req, resp, booking_id): | |
| try: |
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
| from app import log | |
| logger = log.get_logger() | |
| class BookingResource(object): | |
| def __init(self): | |
| pass | |
| def on_put(self, req, resp, booking_id): | |
| try: |