Moved to https://localheinz.com/blog/2017/10/27/essential-phpstorm-plugins/
Examples:
public function sendSingleExample() {
(new SendMailViaAPI('<postmark-server-token>'))->single(
new Mail('sender name', 'sender email', 'recipient email', 'hello from exampletown', '<strong>this is bold</strong> this is not.')
);
}
public function sendBatchExample() {
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php declare(strict_types = 1); | |
| function volume (array $levels) { | |
| return array_sum( | |
| zipWith( | |
| 'subtract', | |
| zipWith( | |
| 'min', | |
| scanl('max', $levels), | |
| scanr('max', $levels) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| echo "$@" | sed -e 's|\\|/|g' -e 's|^\([A-Za-z]\)\:/\(.*\)|/mnt/\L\1\E/\2|' |
The list is now hosted on a repository so you can PR -> https://github.com/jeroenvdgulik/awesome-talks/blob/master/README.md
- Alberto Brandolini - Chasing Elephants https://youtu.be/klsksbDJOhI
- Erik Meijer - One Hacker Way https://youtu.be/FvMuPtuvP5w
- Erik Meijer - Category Theory, The essence of interface-based design https://youtu.be/JMP6gI5mLHc
- Gary Bernhardt - Wat https://www.destroyallsoftware.com/talks/wat
- Konstantin Kudryashov - Min-maxing Software Costs https://youtu.be/uQUxJObxTUs
- Marco Pivetta - Extremely Defensive PHP https://youtu.be/8d2AtAGJPno
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * This class is used as date_class in form component | |
| */ | |
| class CalculationCommand | |
| { | |
| const BASIC_TYPE = 'basic_calculaction_type'; | |
| public $subTotal; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cp /Applications/PhpStorm.app/Contents/bin/phpstorm.vmoptions ~/Library/Preferences/WebIde* | |
| echo -ne "\n-Dawt.useSystemAAFontSettings=lcd\n-Dawt.java2d.opengl=true" >> ~/Library/Preferences/WebIde*/phpstorm.vmoptions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** Generates UUID v4 | |
| * | |
| * @node There is a bug in Chrome's Math.random() according to http://devoluk.com/google-chrome-math-random-issue.html | |
| * For that reason we use Date.now() as well. | |
| */ | |
| function UUID() { | |
| function s(n) { return h((Math.random() * (1<<(n<<2)))^Date.now()).slice(-n); } | |
| function h(n) { return (n|0).toString(16); } | |
| return [ | |
| s(4) + s(4), s(4), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class PaymentController | |
| { | |
| public function makePayment() | |
| { | |
| // POST data: | |
| // fromCustomerId | |
| // toCustomerId | |
| // amount |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # If you would like to do some extra provisioning you may | |
| # add any commands you wish to this file and they will | |
| # be run after the Homestead machine is provisioned. | |
| # Uupdate | |
| sudo apt-get update | |
| # Install some base packages |