Warning
These guidelines haven't been updated since 2016. Learn more…
Table of contents
| #!/usr/bin/env bash | |
| echo ">>> Installing Mailhog" | |
| # Download binary from github | |
| wget --quiet -O ~/mailhog https://github.com/mailhog/MailHog/releases/download/v1.0.0/MailHog_linux_amd64 | |
| # Make it executable | |
| chmod +x ~/mailhog |
Warning
These guidelines haven't been updated since 2016. Learn more…
Table of contents
| #!/usr/bin/env bash | |
| # | |
| # Bootstrap script for setting up a new OSX machine | |
| # | |
| # This should be idempotent so it can be run multiple times. | |
| # | |
| # Some apps don't have a cask and so still need to be installed by hand. These | |
| # include: | |
| # | |
| # - Twitter (app store) |
| /** | |
| * Mass (bulk) insert or update on duplicate for Laravel 4/5 | |
| * | |
| * insertOrUpdate([ | |
| * ['id'=>1,'value'=>10], | |
| * ['id'=>2,'value'=>60] | |
| * ]); | |
| * | |
| * | |
| * @param array $rows |
This tutorial walks through setting up AWS infrastructure for WordPress, starting at creating an AWS account. We'll manually provision a single EC2 instance (i.e an AWS virtual machine) to run WordPress using Nginx, PHP-FPM, and MySQL.
This tutorial assumes you're relatively comfortable on the command line and editing system configuration files. It is intended for folks who want a high-level of control and understanding of their infrastructure. It will take about half an hour if you don't Google away at some point.
If you experience any difficulties or have any feedback, leave a comment. 🐬
Coming soon: I'll write another tutorial on a high availability setup for WordPress on AWS, including load-balancing multiple application servers in an auto-scaling group and utilizing RDS.
| /** | |
| * Force GFORM Scripts inline next to Form Output | |
| * | |
| * force the script tags inline next to the form. This allows | |
| * us to regex them out each time the form is rendered. | |
| * | |
| * see strip_inline_gform_scripts() function below | |
| * which implements the required regex | |
| */ | |
| function force_gform_inline_scripts() { |
| <?php | |
| namespace Vendor\Module\Block\Adminhtml\Widget; | |
| class ImageChooser extends \Magento\Backend\Block\Template | |
| { | |
| /** | |
| * @var \Magento\Framework\Data\Form\Element\Factory | |
| */ | |
| protected $_elementFactory; |
| import json | |
| import gzip | |
| import base64 | |
| import StringIO | |
| from vcr.serialize import deserialize | |
| from vcr.serializers import yamlserializer | |
| path = '../cassettes/api-InstagramAPITestCase-test_media.yml' |
| """ | |
| Suspend an auto scaling group's scaling processes that can interfere with CodeDeploy deploys. | |
| It assumes a single ASG per deployment group. | |
| To use this: | |
| * create a lambda function with this code, then hook up it up to an SNS topic that receives all deployment events (but not host events). | |
| * attach that topic as a trigger in your deployment groups. | |
| Unlike AWS's in-appspec approach, this supports arbitrary deploy concurrency. |