There is a VS Code Workspace file which ties these repos together when they’re sat in the same directory like this:
project
├── project-wp-docker/
├── project-wp-docs/
├── project-wp-theme/
└── project-wp.code-workspace
| <?php defined('BASEPATH') OR exit('No direct script access allowed'); | |
| /** | |
| * $Id: S3.php 47 2009-07-20 01:25:40Z don.schonknecht $ | |
| * | |
| * Copyright (c) 2008, Donovan Schönknecht. All rights reserved. | |
| * | |
| * Redistribution and use in source and binary forms, with or without | |
| * modification, are permitted provided that the following conditions are met: | |
| * |
| <?php | |
| // Installed the need packages with Composer by running: | |
| // $ composer require aws/aws-sdk-php | |
| $filePath = "https://example.com/test.png"; | |
| require 'vendor/autoload.php'; | |
| $bucketName = 'YOUR_BUCKET_NAME'; | |
| $filePath = './YOUR_FILE_NAME.png'; |
| import {Injectable} from '@angular/core'; | |
| // Declare TabsService as a provider in app.module.ts | |
| // Inject TabsService in your class: constructor(public tabs: TabsService){} | |
| // Use the this.tabs.hide() or this.tabs.show() methods wherever you want | |
| @Injectable() | |
| export class TabsService { | |
| constructor() {} | |
| public hide() { |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent| """ | |
| Copies all keys from the source Redis host to the destination Redis host. | |
| Useful to migrate Redis instances where commands like SLAVEOF and MIGRATE are | |
| restricted (e.g. on Amazon ElastiCache). | |
| The script scans through the keyspace of the given database number and uses | |
| a pipeline of DUMP and RESTORE commands to migrate the keys. | |
| Requires Redis 2.8.0 or higher. |
| # | |
| # Verify captcha | |
| $post_data = http_build_query( | |
| array( | |
| 'secret' => CAPTCHA_SECRET, | |
| 'response' => $_POST['g-recaptcha-response'], | |
| 'remoteip' => $_SERVER['REMOTE_ADDR'] | |
| ) | |
| ); | |
| $opts = array('http' => |
| <?php | |
| /** | |
| * This exemple shows how to parse base64 encoded images (submitted using Summernote), save them locally | |
| * and replace the 'src' attribute in the submited HTML content | |
| * | |
| **/ | |
| use Intervention\Image\ImageManagerStatic as Image; | |
| class PostController { | |
| public function edit(){ |
| // Add / Update a key-value pair in the URL query parameters | |
| function updateUrlParameter(uri, key, value) { | |
| // remove the hash part before operating on the uri | |
| var i = uri.indexOf('#'); | |
| var hash = i === -1 ? '' : uri.substr(i); | |
| uri = i === -1 ? uri : uri.substr(0, i); | |
| var re = new RegExp("([?&])" + key + "=.*?(&|$)", "i"); | |
| var separator = uri.indexOf('?') !== -1 ? "&" : "?"; | |
| if (uri.match(re)) { |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.