git init
or
| <?php | |
| /** | |
| * Compare two arrays and return a list of items only in array1 (deletions) and only in array2 (insertions) | |
| * | |
| * @param array $array1 The 'original' array, for comparison. Items that exist here only are considered to be deleted (deletions). | |
| * @param array $array2 The 'new' array. Items that exist here only are considered to be new items (insertions). | |
| * @param array $keysToCompare A list of array key names that should be used for comparison of arrays (ignore all other keys) | |
| * @return array[] array with keys 'insertions' and 'deletions' | |
| */ | |
| public static function arrayDifference(array $array1, array $array2, array $keysToCompare = null) { |
| <?php if (!defined('BASEPATH')) exit('No direct script access allowed'); | |
| /* | |
| Manage multiple hostnames (domains, sub-domains) within a single instance of CodeIgniter. | |
| Example: | |
| If you had the following domain/sub-domain style for your site: | |
| your-domain.com |
| <?php | |
| /** | |
| * Filter the output of image_downsize() to return dynamically generated images for intermediate or inline sizes. | |
| * | |
| * <p>Because Wordpress generates all image sizes on first upload, if you change | |
| * theme or size settings after the upload, there won't be a matching file for | |
| * the requested size.<br/> | |
| * This filter addresses the problem of the default downsize process laoding | |
| * a large file and scaling it down in the browser if it doesn't find the right | |
| * size image. This can cause large files to be loaded unnecessarily and will |
| <?php | |
| /** | |
| * Filter the output of image_downsize() to return dynamically generated images for intermediate or inline sizes. | |
| * | |
| * <p>Because Wordpress generates all image sizes on first upload, if you change | |
| * theme or size settings after the upload, there won't be a matching file for | |
| * the requested size.<br/> | |
| * This filter addresses the problem of the default downsize process laoding | |
| * a large file and scaling it down in the browser if it doesn't find the right | |
| * size image. This can cause large files to be loaded unnecessarily and will |
| <?php | |
| // Here is a sample of the URLs this regex matches: (there can be more content after the given URL that will be ignored) | |
| // http://youtu.be/dQw4w9WgXcQ | |
| // http://www.youtube.com/embed/dQw4w9WgXcQ | |
| // http://www.youtube.com/watch?v=dQw4w9WgXcQ | |
| // http://www.youtube.com/?v=dQw4w9WgXcQ | |
| // http://www.youtube.com/v/dQw4w9WgXcQ | |
| // http://www.youtube.com/e/dQw4w9WgXcQ | |
| // http://www.youtube.com/user/username#p/u/11/dQw4w9WgXcQ |
| #!/bin/bash | |
| sudo add-apt-repository -y ppa:git-core/ppa | |
| sudo apt-get update | |
| sudo apt-get install git -y |
# Ubuntu
sudo apt-get install gpa seahorse
# MacOS with https://brew.sh/
git remote add upstream https://github.com/whoever/whatever.git
git fetch upstream
| <?php | |
| namespace App\Providers; | |
| use Illuminate\Support\Collection; | |
| use Illuminate\Pagination\LengthAwarePaginator; | |
| class AppServiceProvider extends ServiceProvider | |
| { | |
| public function boot() |