Author: Vinta

  1. Updated

    Speed up Python and Node.js builds on Travis CI

    Category: DevOps, JavaScript, Python

    For Python and Node.js projects, you could totally cache both site-packages and node_modules directories in every Travis CI build.

  2. Updated

    Django's get_or_create() may raise IntegrityError but subsequent get() raises DoesNotExist

    Category: Database, Python, Web Development

    get_or_create() 拋出 IntegrityError 但是接著 get() 一次卻會是 DoesNotExist,以上的錯誤常常會發生在 MySQL 的 isolation level 是 REPEATABLE READ 的情況下。MySQL 默認採用 REPEATABLE READ(而 PostgreSQL 預設是 READ COMMITTED)。

  3. Updated

    Transaction isolation levels in MySQL

    Category: Database

    A non-repeatable read occurs, when during the course of a transaction, a row is retrieved twice and the values within the row differ between reads.

  4. Updated

    Configure i18n Translations in Django

    Category: Python, Web Development

    Internationalization and localization for your Django project.

  5. Updated

    Python is call-by-assignment

    Category: Python

    If you pass a mutable object into a method, the method gets a reference to that same object and you can mutate it to your heart's delight, but if you rebind the reference in the method, the outer scope will know nothing about it, and after you're done, the outer reference will still point at the original object. If you pass an immutable object to a method, you still can't rebind the outer reference, and you can't even mutate the object.

  6. Updated

    Upload files to Amazon S3 when Travis CI builds pass

    Category: DevOps, Python, Web Development

    CAUTION! By default, only master branch's builds could trigger deployments in Travis CI.

  7. Updated

    Setup a static website on Amazon S3

    Category: DevOps, Web Development

    Say that you would like to host your static site on Amazon S3 with a custom domain and, of course, HTTPS.

  8. Updated

    AWS Lambda Cookbook

    Category: DevOps, JavaScript, Web Development

    AWS Lambda is an event-driven service that you can upload your code to it and run those code on-demand without having your own servers.

  9. Updated

    AWS DynamoDB Notes

    Category: Database, DevOps, Web Development

    AWS DynamoDB is a fully managed key-value store (also document store) NoSQL database as a service provided by Amazon Web Services. Its pricing model is that you only pay for the throughput (read and write) you use instead of the storage usage and the running hours of database instances.

  10. Updated

    argparse: Create a Command-line App with Python

    Category: Python

    argparse is a Python standard library makes it easy to write a CLI application. You should use this module instead of optparse.