Một chú lịch sử Python 2 ra mắt năm 2000, phiên bản mới nhất của Python 2 là 2.7, ra mắt 2010. Python 3 ra mắt 2008, bản mới nhất là 3.6, phát hành 2016, bản 3.7 đang phát triển (tới thời điểm dịch bài này thì bản 3.7 chạy rồi) Mặc dù python 2.7 […]
Category: Coding
Cấu hình nginx để tạo proxy server tới API Gateway
sửa file config của server thành thế này là được:
Nhật ký xử lý sự cố
Thứ đã cứu vãn cuộc đời mình For everyone having the same issue. I have found a solution that works for me. None of the other solutions here and in the web helped me. 1. Follow the following steps in this solution: https://stackoverflow.com/questions/39144688/aws-lambda-invoke-not-calling-another-lambda-function-node-js2. Additional to that do the following: VPC Dashboard > Route Tables > click on one of […]
How to backup your last time with Xiaomi camera
I bought a Xiaomi camera, with 32GB microSD, it can record about 10 days, but it saves data to many folders, per folder has many files, the length of file less than 60 seconds. When I backup data from microSD to hard disk, it is difficult to watch because I must open file many many time. […]
Gán quyền một bucket cho một user
Gán quyền loằng ngoằng trên giao diện (console), thấy nó ghi full quyền rồi mà khi làm việc với thư mục con lại lỗi, hoá ra full quyền trên giao diện mới được như này: { “Version”: “2012-10-17”, “Statement”: [ { “Sid”: “Stmt1491906008000”, “Effect”: “Allow”, “Action”: [ “s3:*” ], “Resource”: [ “arn:aws:s3:::kamaxuta” ] } ] […]
Thay đổi kiến trúc hệ thống
Nghe có vẻ hầm hố, chả là hồi trước mình có viết một cái chrome extention để mỗi lần mở tab mới sẽ hiện ảnh một em gái xinh xinh. Hồi ấy làm ở VP9 nên dùng chùa server của VP9, sau đó nghỉ VP9 thì mua một cái VPS ở azdigi giá 170k/tháng để làm […]
Update row in mongodb
Database TEST có một COLLECTION tên là IMAGES Có một trường dữ liệu là URL, các url bắt đầu với 65.media và 67.media bị lỗi, phải sửa thành 66.media thì mới show được ảnh ra. Với oracle hay mysql thì 30s là xong ngay. Nhưng với ông mongodb này thì phải mày mò gần 30p, […]
Build a service with AWS Lambda and API Gateway
https://gofore.com/en/going-serverless-with-amazon-s3-and-lambda/ https://www.import.io/post/using-amazon-lambda-and-api-gateway/ https://blog.mitocgroup.com/building-scalable-web-apps-with-aws-lambda-and-home-grown-serverless-web-framework-e04c912d08f0#.pu0eolxh0 https://cloudofficer.co/adding-dynamic-functionality-to-your-static-website-using-aws-lambda-and-api-gateway/ View at Medium.com Bài hay: https://kennbrodhagen.net/2016/01/31/how-to-return-html-from-aws-api-gateway-lambda/ https://neo4j.com/blog/neo4j-aws-lambda-api-gateway-recommendation-engine/ http://blog.michaelschmatz.com/2016/04/02/how-to-build-an-image-host-using-aws-lambda-s3-and-dynamo/ http://readwrite.com/2015/11/16/how-to-build-an-api-amazon-lambda/ https://cloudnative.io/blog/2015/05/lambda-chat/ http://www.nethram.com/aws-lambda-tutorial-step-by-step-instructions-to-create-a-scalable-web-application-part-2/ http://www.bebetterdeveloper.com/coding/architecture/serverless-system-architecture-using-aws.html
Thành tựu
Thành tựu số 01: Hôm nay mình đã thực hiện buổi học đầu tiên với giáo viên tiếng anh người … Ukraina. Chuyện học ở Preply.com: Tiếc tiền nên search ra một loạt các giáo viên 2$/h rồi gửi request, nhắn nhủ kiểu “hey, tao muốn học tiếng anh”. Cắm đầu cắm cổ không để ý […]
Bash không phải tiếng người
Sáng nay, à, cả ngày hôm nay hì hục, rút cục cũng xong cái task “Run file sh from file”. Bài toán thế này: Cho file A, trong file có nhiều dòng, mỗi dòng gồm nhiều tham số, mỗi tham số cách nhau bởi dấu chấm phẩy (;), đọc từng dòng và tách các tham […]