Javascript Data Tables
- https://fooplugins.github.io/FooTable/index.html - good, no inline editing though
- https://datatables.net/ - editable plugin requires purchase
- https://github.com/mleibman/SlickGrid - unmaintained
- https://handsontable.com/ - responsiveness doesn't work very well
- https://github.com/mindmup/editable-table - only supports editing
- https://github.com/David-Mulder/paper-datatable - pretty, but doesn't seem very battle-tested
- https://www.ag-grid.com/ - no tests
- https://github.com/angular-ui/ui-grid - requires angular
- http://ng-table.com/ - requires angular
- http://backgridjs.com/ - requires backbone
- https://github.com/daniel-nagy/md-data-table - pretty, but requires angular
- https://www.dynatable.com/ - not editable
- http://www.jtable.org/ - last updated in 2014, styling looks dated
- https://datazenit.com/static/sensei-grid/examples/ - simple, editable
Falsehoods programmers believe about time and time zones
This article has a lot of great lessons learned about timezones: http://www.creativedeletion.com/2015/01/28/falsehoods-programmers-date-time-zones.htmlSQLAlchemy - JSON not changing on commit
If your changes to a JSON, JSONB, or HSTORE field aren't saving after you commit, then you need to wrap your field in the MutableDict shown here: http://docs.sqlalchemy.org/en/latest/dialects/postgresql.html#sqlalchemy.dialects.postgresql.HSTORESQLAlchemy - AttributeError: type object 'JSONB' has no attribute 'lower'
This error happened because I mistyped "db.column" instead of "db.Column" when I was creating my database model using SQLAlchemy.This might be your problem if db.create_all() isn't creating all the columns you expected.
PHP - Problems With Long Running Processes
Great article about the problems with using PHP for long running processes: https://software-gunslinger.tumblr.com/post/48215406921/php-is-meant-to-die-continuedDescribes the main reason why I started using Python for long-running jobs.
Ansible Vault - storing secrets in repos
When others are deploying a project for you, it's easy for mistakes to be made when secrets must be updated in environmental variables. Ansible-vault takes a different approach and encrypts the secrets - allowing you to store the secrets in your repo.To encrypt a file: ansible-vault encrypt secrets.py
To decrypt a file: ansible-vault decrypt secrets.py
More documentation is available here: http://docs.ansible.com/ansible/playbooks_vault.html
Python - isort, useful tool for sorting python imports
http://timothycrosley.github.io/isort/I saw it in the django coding style documentation: https://docs.djangoproject.com/en/1.9/internals/contributing/writing-code/coding-style/
To make an entire project's imports easier to read, all you need to do is:
- pip install isort
- isort -rc .
There's also a sublime plugin for it here: https://github.com/thijsdezoete/sublime-text-isort-plugin#install
git commit --amend -C HEAD
Ever committed something and needed to make changes later? Just rebase and squash it, right? Or maybe "git reset --soft HEAD~1" and commit again?There's an even better solution: "git commit --amend -C HEAD"
It will add the combine your commit with your last commit. If you already pushed, you will need to force push your change.
pip install -e .
I've wasted a lot of time running "python setup.py install" before testing my changes to flask-admin. It turns out you can pip install a project as "editable", which points the install toward your local directory instead of copying where the rest of your python modules are.To install a project as editable, navigate to the repo and run "pip install -e .".