I hereby claim:
- I am vanderson139 on github.
- I am vanderson139 (https://keybase.io/vanderson139) on keybase.
- I have a public key ASDPOwQDlFmEaAyz7NLU29xNEZpKoLQ35zzaquiQ9IeGiQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
git remote add upstream https://github.com/whoever/whatever.git
git fetch upstream
| docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v /etc:/etc spotify/docker-gc |
| defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false |
| <?php | |
| namespace App\Console\Commands; | |
| use Illuminate\Console\Command; | |
| use Illuminate\Support\Composer; | |
| use Symfony\Component\Finder\Finder; | |
| use Illuminate\Filesystem\Filesystem; | |
| use Symfony\Component\Console\Input\InputArgument; |
| $xml = preg_replace('/(<\/?)(\w+):([^>]*>)/', '$1$2$3', $string); | |
| $xml = simplexml_load_string($xml); | |
| $json = json_encode($xml); | |
| $responseArray = json_decode($json,true); |
| <?php | |
| define('AWS_KEY','YOUR_AWS_KEY_HERE'); | |
| define('AWS_SECRET','YOUR_AWS_SECRET_HERE'); | |
| require_once('AWSSDKforPHP/sdk.class.php'); | |
| require_once('AWSSDKforPHP/extensions/s3streamwrapper.class.php'); | |
| $s3 = new AmazonS3(array( | |
| 'key' => AWS_KEY, |
| On the github website there is guide detailing a worfklow for the developer that wants to have continuous integration on a linux server. | |
| This has been detailed in many gists and goes like this in its simplest form : | |
| 1.git clone on your public_html folder (after you create ssh keys etc) | |
| 2.create a file gitpull.php with the command : exec(git pull); inside it | |
| 3.create a webhook on github to call yourwebsite.com/gitpull.php | |
| What about windows though? you can install git bash, but the above will not work because of permissions, mostly because the user that will invoke the url will be whatever user is running the process that calls php (for example SYSTEM or IUSR) | |
| I have a better, clever solution for that, that uses.. the windows log! Also great for troubleshooting your deployments: |
| <?php | |
| namespace App\Console\Commands; | |
| use Illuminate\Console\Command; | |
| class EnsureQueueWorkerIsRunning extends Command | |
| { | |
| protected $signature = 'queue:checkup'; | |
| protected $description = 'Ensure that the queue worker is running.'; |
| <?php | |
| /* | |
| |-------------------------------------------------------------------------- | |
| | Monefy - PHP Ultimate Money / Currency / Float Formatter and Fixer | |
| |-------------------------------------------------------------------------- | |
| | | |
| | This function formats almost any input to currency and can also | |
| | parse the formatted value as a float for database/backend operations | |
| | |