If you have to extend an existing object with additional property, always prefer Vue.set() over Object.assign() (or spread operator).
Example below explains implications for different implementations.
| from django.apps import apps as global_apps | |
| from django.db import migrations | |
| from djangocms_file.models import get_templates as get_file_templates | |
| from djangocms_picture.models import get_templates as get_picture_templates | |
| def forwards_filer_file(apps, schema_editor): | |
| try: | |
| CMSPluginFilerFile = apps.get_model('cmsplugin_filer_file', | |
| 'FilerFile') |
| //Based on gulpfile.js from Google Web Starter Kit. | |
| //https://github.com/google/web-starter-kit | |
| 'use strict'; | |
| // Include Gulp & Tools We'll Use | |
| var gulp = require('gulp'); | |
| var $ = require('gulp-load-plugins')(); | |
| var del = require('del'); | |
| var runSequence = require('run-sequence'); | |
| var browserSync = require('browser-sync'); |
| #!/usr/bin/env bash | |
| # file: ~/.virtualenvs/postmkvirtualenv | |
| # This hook is run after a new virtualenv is activated. | |
| # setup python interpretor and sitepackages | |
| # for Sublime Text's SublimeCodeIntel plugin. | |
| # codeintel looks in the root of any folder opened via `subl foldername` | |
| # for foldername/.codeintel/config | |
| # it also looks in ~/.codeintel/config |
| from deepcopy import deepcopy | |
| from classytags.core import TagMeta | |
| from classytags.arguments import ARgument | |
| from classytags.helpers import AsTag | |
| def make_as_tag(original, new_name): | |
| class NewTag(AsTag, original): | |
| name = new_name | |
| options = deepcopy(original.options) |
| find . -iname "*.php" > /tmp/my_theme_file_list.txt | |
| # new template | |
| xgettext --from-code=utf-8 -d my_theme -f /tmp/my_theme_file_list.txt --keyword=__ -o languages/my_theme.pot | |
| # update template | |
| xgettext --from-code=utf-8 -d my_theme -j -f /tmp/my_theme_file_list.txt --keyword=__ -o languages/my_theme.pot |
| bootstrap-tooltip.js | |
| bootstrap-popover.js | |
| bootstrap-alert.js | |
| bootstrap-button.js | |
| bootstrap-carousel.js | |
| bootstrap-collapse.js | |
| bootstrap-dropdown.js | |
| bootstrap-modal.js | |
| bootstrap-scrollspy.js | |
| bootstrap-tab.js |
kvz: "I'm recommending these Mac apps to a colleague who's losing his OSX virginity: https://gist.github.com/1372883. Anything you think I should add?"
Don't forget to look at the suggestions at the bottom, there's some cool stuff in there.
| """ | |
| This fabric file makes setting up and deploying a django application much | |
| easier to webfaction servers or your dedicated server, but it does make a | |
| few assumptions. Namely that you're using Git, Apache and mod_wsgi. Also | |
| you should have SSH installed on both the local machine and any servers you | |
| want to deploy to. | |
| Thanks to: | |
| https://github.com/ryanmark/django-project-templates |
| from cms.templatetags.cms_tags import Placeholder, PlaceholderOptions | |
| from classytags.helpers import AsTag | |
| from classytags.arguments import Argument, MultiValueArgument | |
| from django import template | |
| register = template.Library() | |
| class NewPlaceholder(AsTag, Placeholder): | |
| name = 'new_placeholder' | |
| options = PlaceholderOptions( |