Setup pre-commit hook in php projects for lint, code standard, test cases etc.
- php >= 5.6
- composer
- git
| ##################### | |
| # | |
| # Use this with or without the .gitattributes snippet with this Gist | |
| # create a fixle.sh file, paste this in and run it. | |
| # Why do you want this ? Because Git will see diffs between files shared between Linux and Windows due to differences in line ending handling ( Windows uses CRLF and Unix LF) | |
| # This Gist normalizes handling by forcing everything to use Unix style. | |
| ##################### | |
| # Fix Line Endings - Force All Line Endings to LF and Not Windows Default CR or CRLF |
Note: paths below assume subdirectory install in wordpress subdirectory and WordPress multi-environment configuration.
See: Why are there path disclosures when directly loading certain files?
Add the following to .user.ini (or similar):
| *useful google drive links* | |
| Google drive movies - https://drive.google.com/drive/u/0/mobile/folders/0B6FjKMQKynZILTlwZHl4ajUwcFU | |
| *Programming language collection on google drive* - https://drive.google.com/drive/folders/0ByWO0aO1eI_MN1BEd3VNRUZENkU | |
| *Books*- | |
| https://drive.google.com/drive/folders/0B0hgUX3me1_RNi1KTXBzXzdXSzA | |
| *Google drive hacking ebook collection* | |
| - https://drive.google.com/drive/folders/0B-JzQsKoJaANbTFGN0RWLWhONms |
| // Creates a new promise that automatically resolves after some timeout: | |
| Promise.delay = function (time) { | |
| return new Promise((resolve, reject) => { | |
| setTimeout(resolve, time) | |
| }) | |
| } | |
| // Throttle this promise to resolve no faster than the specified time: | |
| Promise.prototype.takeAtLeast = function (time) { | |
| return new Promise((resolve, reject) => { |
| package com.girlathome.utilities; | |
| import android.util.Log; | |
| import java.text.ParseException; | |
| import java.text.SimpleDateFormat; | |
| import java.util.Date; | |
| import java.util.Locale; | |
| /** |
| <?php | |
| /** | |
| * @file | |
| * Basic demonstration of how to do parallel threads in PHP. | |
| */ | |
| // This array of "tasks" could be anything. For demonstration purposes | |
| // these are just strings, but they could be a callback, class or | |
| // include file (hell, even code-as-a-string to pass to eval()). |
By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
| <?php | |
| use Illuminate\Console\Command; | |
| use Symfony\Component\Console\Input\InputOption; | |
| use Symfony\Component\Console\Input\InputArgument; | |
| class AppDebug extends Command { | |
| /** | |
| * The console command name. |