(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.
| export PROJECT_ID=<your-project-id> | |
| # e.g. europe-west1 | |
| export REGION=<your-region> | |
| export APP_NAME=<your-app-name> | |
| # | |
| # Enable all required Google Cloud APIs | |
| # | |
| gcloud services enable artifactregistry.googleapis.com | |
| gcloud services enable run.googleapis.com |
| # delete local tag '12345' | |
| git tag -d 12345 | |
| # delete remote tag '12345' (eg, GitHub version too) | |
| git push origin :refs/tags/12345 | |
| # alternative approach | |
| git push --delete origin tagName | |
| git tag -d tagName |
| When programming apps for Android, you usually want to test them on real Android devices. | |
| This little gist describes how to do so using Ubuntu 14. | |
| First, you need to download and install the Android development IDE (http://developer.android.com/sdk/index.html) and create an Android project which you want to debug. | |
| Next, you need to setup the debugging mode on your Android device. Starting in Android 4.2 you need to enable the developer options first: 1) Go to settings 2) Go to About Phone 3) Tap the build number 10 times (or more, not sure ;)) and you will get the notification that you enabled it. | |
| Then go to the developer settings and enable the debug mode for your phone. | |
| Now you think you can just plug it into your USB mode? - Nope. |
| # first we download the list of IP ranges from CloudFlare | |
| wget https://www.cloudflare.com/ips-v4 | |
| # iterate over the lines in the downloaded file | |
| # make sure to set `--group-id` and `--port`; more details at http://docs.aws.amazon.com/cli/latest/reference/ec2/authorize-security-group-ingress.html | |
| while read p; do aws ec2 authorize-security-group-ingress --group-id sg-e0000000 --protocol tcp --port 80 --cidr $p; done< ips-v4 |
| # Running xdebug in the console, for debugging Laravel artisan commands. Useful as I keep forgetting this one... | |
| php -dxdebug.remote_autostart artisan | |
| #Running phpcs for 5.3: | |
| phpcs -pv --standards= --runtime-set testVersion 5.3 --ignore=*/public/*,*.js,*.css,*/tests/*,*/views/training/* . |
(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.
| /* | |
| <a href="posts/2" data-method="delete"> <---- We want to send an HTTP DELETE request | |
| - Or, request confirmation in the process - | |
| <a href="posts/2" data-method="delete" data-confirm="Are you sure?"> | |
| */ | |
| (function() { |
| /** | |
| * Cache delete handler for Laravel 5.1 pagination. | |
| * | |
| * @array list of laravel cache keys | |
| * @param int $totalResults Total results for pagination | |
| * @param int $perPage Page results | |
| * @return Response | |
| * | |
| * You need to cache your pages with this key pattern: | |
| * Cache::rememberForever('key.' . $currentPage , function(){}); |