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.
| <?php | |
| // coverage-checker.php | |
| //https://ocramius.github.io/blog/automated-code-coverage-check-for-github-pull-requests-with-travis/ | |
| $inputFile = $argv[1]; | |
| $percentage = min(100, max(0, (int) $argv[2])); | |
| if (!file_exists($inputFile)) { | |
| throw new InvalidArgumentException('Invalid input file provided'); | |
| } |
| { | |
| "Statement": [ | |
| { | |
| "Action": [ | |
| "apigateway:*", | |
| "cloudformation:CancelUpdateStack", | |
| "cloudformation:ContinueUpdateRollback", | |
| "cloudformation:CreateChangeSet", | |
| "cloudformation:CreateStack", | |
| "cloudformation:CreateUploadBucket", |
| import PopperTooltip from 'tooltip.js'; | |
| new Vue({ | |
| el: '#app', | |
| mounted() { | |
| document.querySelectorAll('[data-tooltip]').forEach(elem => { | |
| new PopperTooltip(elem, { | |
| placement: elem.dataset.tooltipPlacement || 'top', | |
| title: elem.dataset.tooltip |
| <?php | |
| use Illuminate\Support\Facades\Log; | |
| use Symfony\Component\HttpFoundation\File\UploadedFile; | |
| /** | |
| * stream - Handle raw input stream | |
| * | |
| * LICENSE: This source file is subject to version 3.01 of the GPL license | |
| * that is available through the world-wide-web at the following URI: |
| <?php | |
| use Illuminate\Support\Facades\Artisan; | |
| use Illuminate\Support\Facades\Config; | |
| use Illuminate\Support\Facades\DB; | |
| use Illuminate\Support\Facades\Schema; | |
| if (! function_exists('tenant_connect')) { | |
| /** | |
| * Establish a tenant database connection. |
| <?php | |
| namespace App\Providers; | |
| use Illuminate\Database\Query\Builder; | |
| use Illuminate\Support\Facades\Request; | |
| use Illuminate\Support\ServiceProvider; | |
| class EloquentSortableServiceProvider extends ServiceProvider | |
| { |
Merged from https://github.com/joelparkerhenderson/git_commit_message and https://chris.beams.io/posts/git-commit/
| /** | |
| * Map global filters for being used from within `methods`. This makes them usable in js as well as templates | |
| * @param {Array} filters - A list of registered filter names | |
| * @return {Object) An object containing filters and their functions | |
| */ | |
| export function mapFilters(filters) { | |
| return filters.reduce((result, filter) => { | |
| result[filter] = function(...args) { | |
| return this.$options.filters[filter](...args); | |
| }; |
| https://yourdomain.example.com/ { | |
| log / /var/log/caddy/mastodon.log "{combined}" { | |
| rotate_age 90 | |
| } | |
| root /home/mastodon/live/public | |
| gzip | |
| header / { | |
| Strict-Transport-Security "max-age=31536000" | |
| } |