// webpack.mix.js
const mix = require('laravel-mix')
const path = require('path')
// ...
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
| // resources/js/models/Model.js | |
| export default class Model { | |
| constructor (attributes = {}) { | |
| this.fill(attributes) | |
| } | |
| static make (attributes = {}) { | |
| return Array.isArray(attributes) | |
| ? attributes.map(nested => new this(nested)) |
This gist describes two processes allowing us to access the Google API and to register some webhooks. At the end of both processes we will obtain all variable needed to start using their API and we will have whitelisted all necessary URL to get started. We will be using the Google Calendar API and the Google Plus API to access the email address of the user.
This gist has been created as an Appendix to this article (part 1) and this article (part 3).
Note that, I will be using a randomly generated ngrok domain during this presentation. Simply replace b3093b51.ngrok.io with your domain name
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
| // resources/js/services/Form.js | |
| import FormErrors from './FormErrors' | |
| export default class { | |
| constructor (initialData = {}, submitCallback = null) { | |
| this._initialData = initialData | |
| this._submitCallback = submitCallback | |
| this.errors = new FormErrors() |
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 | |
| /** | |
| * Insert a value or key/value pair after a specific key in an array. If key doesn't exist, value is appended | |
| * to the end of the array. | |
| * | |
| * @param array $array | |
| * @param string $key | |
| * @param array $new | |
| * |
- https://documentation.mailgun.com/en/latest/best_practices.html
- https://web.archive.org/web/20190712215152/http://static.mailchimp.com/web/guides/email-delivery-for-it-professionals/package/email-delivery-for-it-professionals.pdf
- https://habr.com/ru/company/mailru/blog/239963/
- https://web.archive.org/web/20200511203220/https://yandex.ru/support/mail/web/spam/honest-mailers.html
- https://help.mail.ru/developers/mailing_rules/technical
- https://help.mail.ru/developers/mailing_rules/general
- https://support.google.com/mail/answer/81126?hl=ru
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 | |
| $array = array_map("str_getcsv", explode("\n", $csv)); | |
| print json_encode($array); |
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
| // create a bookmark and use this code as the URL, you can now toggle the css on/off | |
| // thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3 | |
| javascript: (function() { | |
| var elements = document.body.getElementsByTagName('*'); | |
| var items = []; | |
| for (var i = 0; i < elements.length; i++) { | |
| if (elements[i].innerHTML.indexOf('* { background:#000!important;color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }') != -1) { | |
| items.push(elements[i]); | |
| } | |
| } |
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 | |
| <?php | |
| ///amo integra begin | |
| $values = $hook->getValues(); | |
| $subject = $modx->getOption('emailSubject', $formit->config, 'form-'.$modx->resource->get('emailSubject')); | |
| $name = $values['name']; | |
| $phone = $values['phone']; | |
| $email = $values['email']; | |