Create a cluster on GKE:
gcloud container clusters create backend --num-nodes=2 --machine-type n1-standard-4
Get credentials:
gcloud container clusters get-credentials backend
Build the docker image:
Create a cluster on GKE:
gcloud container clusters create backend --num-nodes=2 --machine-type n1-standard-4
Get credentials:
gcloud container clusters get-credentials backend
Build the docker image:
#!/bin/bash | |
# A bash script to remove old versions of a Google App Engine instance. | |
# | |
# Inspiration of script taken from: | |
# https://almcc.me/blog/2017/05/04/removing-older-versions-on-google-app-engine/ | |
# Original code by Alastair McClelland and Marty Číž. | |
# Assembled and modified by Johan Niklasson. | |
# | |
# To run this script, execute |
name: Laravel Vapor CD | |
on: | |
release: | |
types: [ published, deleted ] | |
branches: | |
- master | |
jobs: | |
deploy_release: | |
runs-on: ubuntu-20.04 |
I've had the opertunity to try a variety of different server configurations but never really got around to trying HHVM with Magento until recently. I thought I would share a detailed walkthrough of configuring a single instance Magento server running Nginx + Fast CGI + HHVM / PHP-FPM + Redis + Percona. For the purpose of this blog post I'm assuming you are using Fedora, CentOS, or in my case RHEL 6.5.
Please note: I'm 100% open to suggestions. If you see something I did that needs to be done a different way, please let me know. I haven't included my Perconca my.conf file yet. I will shortly. Also I plan on trying this same test with HHVM 3.3 and PHP 7.
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
{ | |
"csv":"function(head, req){ | |
start({ | |
'headers': { | |
'Content-Type': 'text/csv' | |
} | |
}); | |
Array.prototype.unique = function() { | |
var a = this.concat(); |
This page will help you run continuous integration for PHP CodeSniffer and PHP-CS-Fixer using GitHub Actions.
To setup GitHub Actions in your repository, create a .github/workflows/ci.yml
file in your repository and commit it.
The content of that file depends on the tool you want to run, please read the examples below.
Note: the examples below are provided to get you started easily, it is possible you may need to adjust them to fit your project.
Quick Example of registering a scheme in TiApp.xml, implementing the code in app.js / alloy.js
filter: | |
paths: ["app/code/{vendor-name-goes-here}/*", "vendor/{vendor-name-goes-here}/*"] | |
excluded_paths: | |
- "vendor/{vendor-name-goes-here}/{module-name-goes-here}/*" | |
- "app/code/{vendor-name-goes-here}/{module-name-goes-here}/*" | |
- '*.min.js' | |
before_commands: | |
tools: | |
php_code_sniffer: | |
config: { standard: 'Zend,PSR-1,PSR-2' } |
We're big fans of open source software at Legal Robot. We also know that getting security right is a tough job, so we want to share some of the useful tools we use to build and run Legal Robot and keep it secure.
We are also proud to run Legal Robot on the Meteor framework for Node.js. With this recent change, Helmet.js becomes the official recommendation for security headers in Meteor, replacing the previous Meteor browser-policy package.
One of the most helpful tools in our Meteor security toolbox at Legal Robot is Content Security Policy (CSP) — basically, our server tells the browser what code it is allowed to run and how to handle something like code injection from a malicious browser extension.
CSP can be quite tricky, but there are some excellent tools out there to help, like [Google'
With Alloy and Hyperloop, you can quickly and easily expose native UI as Custom Alloy tags by leveraging the namespace (ns) attribute and commonjs modules.
Alloy allows you to create your own UI element that can be included into the XML View heirarchy in one of two ways, an Alloy Widget or through the use of Custom Tags.
To create your own custom tag, you link the tag to the commonjs module with the namespace attribute (ns). Here is an example using a custom tag to render a standard Titanium View: