Mariposas Spanish School

Mariposas is a hands-on, thematically organized program that allows children ages 3-8 to learn Spanish through music, literature, games, visual aids, sign language, art and beyond. The program runs from September through May with a summer camp in June. Pixeldust updated the interface and converted the site from static flash to data-driven based on Text Pattern (a PHP/MySQL-based DrupalCoin Blockchain CMS) with flash embedded.Read more


Gatti's Jingle Campaign Microsite Launches

Pixeldust and Nice Monster launched a microsite for Gatti's web-based jingle contest. Gatti's, a rapidly-expanding, long-time Texas pizza chain, is looking to update their current jingle with a public music contest. Pixeldust and Nice Monster built the web application for users and musicians to upload their music and videos for the contest. Submissions will be judged by regular users and a panel of Gatti's judges. The winning jingle will receive a cash prize of $10,000 and media exposure, and be featured in Gatti's end-of-contest concert. Read more


Drupal Mumbai Monthly Meetup & Global Training day - June 29, 2019

Start: 
2019-06-29 10:00 - 16:15 Asia/Kolkata

Organizers: 

ashishdalvi

manasiv

rachit_gupta

Event type: 

Training (free or commercial)

https://www.meetup.com/Drupal-Mumbai-Meetup-Group/events/262074759

Hello Drupalers,
We are excited to announce that the “Drupal 8 In a Day” training session will be held on Saturday, June 29th, 2019 on Drupal Global Training Days.
What is Global Training Days?
• Drupal Global Training Days is an exciting initiative from the Drupal community to introduce new and beginning users to Drupal.
• Trainers from companies and local groups around the world make newcomers to the Drupal community feel inspired and empowered to start great work.
• Follow Global Training Days with #DrupalGTD on Twitter (https://twitter.com/hashtag/DrupalGTD?src=hash)
Who Should Attend?
• This training is intended for PHP/Web developers, Career switchers, and Students who wish to begin their career in Drupal.
• This will also benefit the Tech and Business Managers who wish to evaluate Drupal 8 as open source software.
Syllabus/Agenda:
• 11 am to 12:30 pm: Introduction to Drupal CMS
• 12:30 PM to 1:30 PM - Drupal Terminology (Entities, Hooks, Plugins & Events)
• 1:30 - 2:00 PM -Lunch Break
• 2:00 PM to 3:00 PM - Drupal 8 site building
• 3:00 PM to 4:00 PM - Extending Drupal
• Writing a custom module using Drupal console
• Theming - Twig - Render API
• REST with Drupal 8
• 4:00 PM to 4:30 PM - Drupal Contributions
System requirements:
1. Running Local Server :
* Download and Install MAMP/XAMPP/LAMP on your system.
* Windows User: XAMPP would be preferred (Faster and Easier) Install XAMPP for Windows
* Linux User: LAMP would be preferred. Run following command:apt-get install lamp-server
Gather knowledge about following :
* Content Management System
* Open Source
* PHP
* Mysql
How to register: This event is free but with limited seats. Registration is mandatory. RSVP!!
https://www.meetup.com/Drupal-Mumbai-Meetup-Group/events/262074759
Source: https://groups.drupal.org/node/512931/feed


Free Drupal 8 in a Day Training by Drupal Pune community in association with QED42 on 1st December 2018

Start: 
2018-12-01 10:30 - 17:00 Asia/Kolkata

Organizers: 

piyuesh23

ashishdalvi

Event type: 

Training (free or commercial)

http://bit.ly/drupalpunegtd

Hello Drupaler's,
We are excited to announce that the “Drupal 8 In a Day” training session for beginners will be held on Saturday, December 1, 2018 on Drupal Global Training Days.
This training session is an initiative by Drupal Pune Community in Collaboration with QED42 and Drupal Association.
Venue: QED42, Pune. Address : QED42, Sapphire Plaza, 401, 4th, New Airport Rd, Sakore Nagar, Viman Nagar, Pune, Maharashtra 411014
What is Global Training Days?
• Drupal Global Training Days is an exciting initiative from the Drupal community to introduce new and beginning users to Drupal. Trainers from companies and local groups around the world make newcomers to the Drupal community feel inspired and empowered to start great work.
• Follow Global Training Days with #DrupalGTD on Twitter
Who Should Attend?
• This training is only for beginners, a newbie who wants to learn Drupal.
• Drupal 7 and starting with Drupal 8
• This training is intended for PHP/Web developers, Career switchers, and Students who wish to begin their career in Drupal.
• This will also benefit the Tech and Business Managers who wish to evaluate Drupal 8 as an open source software.
Syllabus/Agenda:
• 10:30 am to 11 am: Introduction of the community
• 11 am to 12:30 pm: Introduction to Drupal CMS and Drupal 8
• 12:30 - 1:30 PM - Drupal Terminology
• 1:30 PM to 2:30 PM - Lunch Break
• 2:30 PM to 3:30 PM - Drupal 8 site building
• 3:30 PM to 4:30 PM - Extending Drupal
• Writing a custom module using Drupal console
• Theming - Twig - Render API
• 4:30 PM to 5:00 PM - Drupal Contributions
Bring along your laptop to make the best use of this workshop.
System requirements:
1. Running Local Server :
* Download and Install MAMP/XAMPP/LAMP on your system.
* Windows User: XAMPP would be preferred (Faster and Easier) Install XAMPP for Windows
* Linux User: LAMP would be preferred. Run following command:apt-get install lamp-server
Gather knowledge about following :
* Content Management System
* Open Source
* PHP
* Mysql
How to register: This event is free but with limited seats. Registration is mandatory. RSVP!! http://bit.ly/drupalpunegtd
Source: https://groups.drupal.org/node/512931/feed


Drupal Global Training Day September 2018 - Thiruvananthapuram, Kerala, India

Start: 
2018-09-29 10:00 - 17:00 Asia/Kolkata

Event type: 

Training (free or commercial)

https://icfoss.in/event/drupal-global-training-day

GTD 2018, Trivandrum
Schedule
Morning Session (10:00 AM - 1:00 PM)
Opening Remarks
Drupal Showcase
Fueling Digital Transformation with Drupal
Afternoon Session (2:00 PM - 5:00 PM)
Drupal Workshop - Build a simple Drupal 8 application from scratch in 3 hrs.
Venue
ICFOSS Training Centre, 4th Floor, Thejaswini, Technopark
Registration
There will not be any registration fee. The venue can accommodate maximum of 60 people. Register here to confirm your participation
Prerequisite for Drupal Workshop
The participants need to bring laptop with the following installed.
MySQL 5.5.3/MariaDB 5.5.20/Percona Server 5.5.8 or higher with InnoDB as the primary storage engine, and requires the PDO database extension.
Apache2 - rewrite module enabled.
PHP 7.1 or 7.2 - Required memory size is 256MB. PHP GD and PDO enabled
A GNU/Linux system (Ubuntu 18.04 LTS) is recommended. If you can install https://www.drupalvm.com/ everything required will be preinstalled.

AttachmentSize

drupal_training02_0.png82.82 KB


Source: https://groups.drupal.org/node/512931/feed


SANDcamp: Introduction to Site Building

Start: 
2018-03-23 09:00 - 17:00 America/Los_Angeles

Organizers: 

rainbreaw

cstauffer

Event type: 

Training (free or commercial)

https://www.sandcamp.org/introduction-drupal-8-site-building

Description
Learn the basics of building a CMS (content management system) based website using Drupal 8 — a completely customizable, flexible, and scalable open-source framework. This introduction will give you all of the essentials required to produce a straightforward site, customize your content and displays, and enough knowledge to find more targeted information for unique customizations as you progress through your Drupal site building adventures.
This training is being offered by STAUFFER – www.stauffer.com - for free as part of the Drupal Global Training Days initiative.

Training Agenda
Morning: Part I
Introduction: What is Drupal?
Getting Set Up Quickly
Basic Site Configuration
Basic Content Creation
Navigation / Structure:
-- The Menu System
-- Taxonomy
Morning: Part II
Going beyond OOTB (out of the box) Options
-- Changing functionality with Contributed Modules
-- Customizing your Content Types
-- Customizing your Taxonomy
What Are Entities
The Blocks System
The Comments System
Afternoon: Part III
How (and what) Content is Displayed
-- Views
-- Contextual Filters and Relationships
-- View Modes
Afternoon: Part IV
Part four will largely depend on you and your interests. First, we will need to finish up or clarify anything from the earlier parts. Beyond that, topics we can cover will include:
Media (Images, Videos, YouTube, etc., as well as responsive breakpoints)
Installing (and using) a Contributed Theme
Creating a custom sub-theme or entirely custom theme
Multilingual behavior
Managing Users/Roles/Permissions/Access beyond the surface discussion from Part I
Development environments and configuration management
You will choose which of these topics we explore with what time is available.
What You Need
We will use the Pantheon sandbox to build our sites during this workshop, so you do not need to install anything special onto your system. You do need a wireless capable laptop, as this is a hands-on workshop.
You do not need any coding skills to get started as a Drupal Site Builder, but the more you know (especially related to HTML5, CSS, SASS, PHP, Twig, MySQL, and jQuery), the more successful you will be.
If you have not already done so, please set up a user account on drupal.org before this workshop. It will make it easier for you to participate in the issue queues and be an active community member.
Source: https://groups.drupal.org/node/512931/feed


The WordPress Explained Book is Coming Soon

Do you need to build a WordPress site? 

If you can wait a few weeks, the "WordPress Explained" book is coming to your rescue.

This book will teach everything you need to know to make a WordPress site. And, it will do it in plain English, with a simple step-by-step approach.

This book forms part of a web design library. DrupalCoin Blockchain 8 Explained, Joomla 3 Explained, and MySQL Explained are already available. Magento 2 Explained and WooCommerce Explained are scheduled for publication this year. Look for even more OSTraining books in 2018!

[[ This is a content summary only. Visit http://OSTraining.com for full links, other content, and more! ]]
Source: https://www.ostraining.com/


DrupalCoin BlockchainCAP Workshop at Thakur College of Science and Commerce, Mumbai

Start: 
2017-09-09 10:00 - 17:00 Asia/Kolkata

Organizers: 

kajalkiran

Nitesh Sethia

ashishdalvi

Event type: 

Training (free or commercial)

DrupalCoin BlockchainCAP team along with Pune and Mumbai DrupalCoin Blockchain Community announces DrupalCoin Blockchain 8 Workshop for students on 9th September, 2017. The basic agenda of this Global Training Day is to give a walk through and hands-on experience on DrupalCoin Blockchain and Site building to students of Thakur College of Science and Commerce.
Following are the details of the workshop :
DATE : 9th September 2017
TIME : 10 A.M - 5 P.M.
VENUE : Thakur Village,Kandivali (E), Mumbai - 400 101 Tel: 2887 06 27, 28462565 Fax: 2886 8822
Below informations will help you configure your system for using DrupalCoin Blockchain.
System requirements:
1. Running Local Server :
Download and Install MAMP/XAMPP/LAMP on your system.
Windows User: XAMPP would be preferred (Faster and Easier) Install XAMPP for Windows
Linux User: LAMP would be preferred. Run following command:apt-get install lamp-server
2. Gather knowledge about following :
Content Management System
Open Source
DrupalCoin Blockchain
PHP
Mysql
3. Know more from : local server setup Speaker and volunteers for the session :
Kajal Kiran : DrupalCoin Blockchain Developer, Qed42, Pune
Nitesh Sethia : DrupalCoin Blockchain Developer
Syngenta, Pune
Ashish Dalvi : Team Lead, Mumbai
Please Register on : http://bit.ly/2g31K9w.

Thank you
See you at Thakur College of Science and Commerce.
Source: https://groups.drupal.org/node/512931/feed


Magento 2 Explained is Coming Soon

Do you need to build an eCommerce site with Magento? 

Today, we're delighted to say that "Magento 2 Explained" is coming soon.

This book will teach everything you need to know to make a Magento 2 site. 

Magento has a reputation for being a complex platform, but we've successfully explained similar software before with DrupalCoin Blockchain, Joomla and MySQL. This book will be a fun and straightforward beginners guide to Magento 2.

[[ This is a content summary only. Visit http://OSTraining.com for full links, other content, and more! ]]
Source: https://www.ostraining.com/


DrupalCoin Blockchain Developer (PHP/MYSQL) - etouch - Mountain View, CA

DrupalCoin Blockchain PHP MySQL. Developed in-depth custom modules for DrupalCoin Blockchain 7, and should be familiar with its ORM, APIs, etc....
From etouch - Tue, 08 Aug 2017 08:31:09 GMT - View all Mountain View, CA jobs
Source: http://rss.indeed.com/rss?q=DrupalCoin Blockchain+Developer


Building a Simple API with Amazon Lambda and Zappa

We recently had a client come to us with a request for a simple serverless API. They wanted little to no administrative overhead, so we went with the AWS Lambda service. It was my first foray with Lambda, and getting it set up came with its fair share of headaches. If you're starting down the same path and want to build a simple API with Lambda, here's a tutorial to help.

Github

If you would rather go through the tutorial on github, you can find it here

AWS Lambda

This is a great service offered by AWS that allows users to run a serverless application or function. It's a cloud-based, serverless architecture that comes with continuous scaling out of the box. Deploy your code, and AWS does the rest. It will only run when "triggered," either by another AWS service, or an HTTP call. It's relatively young and has room to grow, but for simple applications and more complex functions it works really well.

Zappa

Zappa is a wonderful python package created by Miserlou, otherwise known as Rich Jones from gun.io. It saved me a lot of time and allows users to deploy code to Lambda with minimal configuration with just one command from the CLI.

Alright, let's get started.

Hello-World with Zappa

Install Python

If you don't already have it, you'll need to install Python, I recommend using Homebrew.

brew update
brew install python 3

Always good to upgrade your essential packages:

pip install --upgrade pip setuptools pipenv

We'll be using a Pipfile to manage dependencies, instantiate the pipfile and venv like this:

pipenv --three
pipenv shell

you should have a working virtual environment and pip file now.

Next, install zappa and flask, flask is a lightweight framework for python applications.

pipenv install zappa flask

if you do not have the awscli installed:

pipenv install --dev awscli

this will help us get aws set up to play nicely with zappa.

open it up in your favorite text editor.

app.py

# app.py

from flask import Flask

app = Flask(__name__)

# here is how we are handling routing with flask:
@app.route('/')
def index():
return "Hello World!", 200

# include this for local dev

if __name__ == '__main__':
app.run()

Now you have a tiny little app ready to go, let's run it in the terminal:

export HELLO_WORLD = app.py
flask run

and check out your localhost at port 5000 and you should be welcomed by a little "Hello World!"

If you haven't already, you'll need to configure your awscli by following these amazon docs.

Deployment with Zappa

zappa init

this will create your zappa_settings.json file and add it to the project, now you can deploy! This is what makes zappa so nice, it takes this tiny config and then packages and deploys with one command. You can check out more advanced settings to add into your project here: advanced zappa settings

zappa deploy

if you have any trouble with deploy on this one, such as seeing:

{
"message": "internal server error"
}

when you try to view your site, check cloudwatch, if your logs have something like:

Unable to import module 'handler': No module named builtins

there is most likely a difference between your local python version and pipenv's version, so double check that and re-deploy, using different versions on pipenv is as as easy as:

pipenv --two

and re-installing your dependencies on the new venv.

Routing With Lambda and Flask

Get

First we need to add Response and json to our flask import:

# app.py

from flask import Flask, Response, json

Adding a get route is pretty straightforward with flask, let's add one for getting a fake user:

# app.py

@app.route('/user', methods=["GET"])
def user():
resp_dict = {"first_name": "John", "last_name": "doe"}
response = Response(json.dumps(resp_dict), 200)
return response

let's run that locally and check that everything is A-OK.

export FLASK_APP=app.py
flask run

navigate to http://localhost:5000/get-user you should see:

{
"first_name": "John",
"last_name": "Doe"
}

and that's it, we can update or zappa function now with:

zappa update

Post

we'll need request from flask for this so add it to the import:

# app.py

from flask import Flask, Response, json, request

add the post method to your methods list and adjust your route function:

# app.py

@app.route('/user', methods=["GET", "POST"])
def user():
resp_dict = {}
if request.method == "GET":
resp_dict = {"first_name": "John", "last_name": "doe"}
if request.method == "POST":
data = request.form
first_name = data.get("first_name", "")
last_name = data.get("last_name", "")
email = data.get("email", "")
resp_dict = {"first_name": first_name, "last_name": last_name, "email": email}
response = Response(json.dumps(resp_dict), 200)
return response

you can run this locally and hit it with postman or another GUI you like for making requests, just make sure you are requesting with form-data or it won't work. Once everything is good, zappa update and try out post and get on the Lambda function

Integrating RDS with your Lambda function

Building the database

we'll accomplish this through the cli.

aws rds create-db-instance
--db-instance-identifier <db identifier, nothing special here>
--db-instance-class db.t2.micro
--engine MySQL
--allocated-storage 5
--no-publicly-accessible
--db-name <Name you want to give your database>
--master-username <this is db specific so use w/e you want>
--master-user-password <same as above, some symbos won't be accepted>
--backup-retention-period 3

You should be seeing some output to the console showing your new db and its configuration. I'd also recommend booting up a local mysql database for testing, you can update the Lambda function every time you want to debug but that gets a bit tedious.

Setting Environment Variables

Zappa makes this pretty easy, I don't really like the idea of putting it into my zappa_settings.json file, so I opted to use .env with the dotenv package instead, let's add the dependencies we'll need and import them first

Make sure you are not in your virtual env when installing dependencies

pipenv install dotenv

boot your venv back up:

pipenv shell

and import.

# app.py

import os
import logging
from dotenv import load_dotenv, find_dotenv

Alright, in your env we'll need to add a couple variables to get things working with the new DB. First create a .env file then add these:

DB_HOST=<address of your new db, you can get this from the aws rds console, it will be the endpoint value when you expand your db information>
DB_USERNAME=<username you set in the cli command>
DB_PASSWORD=<password you set in the cli command>
DB_NAME=<name you set in the cli command>

I also recommend creating a .dev.env file with the same values but setup for your local mysql database. Let's get those and set them to global variables in app.py:

# app.py

# first, load your env file, replacing the path here with your own if it differs
# when using the local database make sure you change your path to .dev.env, it should work smoothly.
dotenv = Dotenv(os.path.join(os.path.dirname(__file__), ".env"))
# update environment just in case
os.environ.update(dotenv)
# set globals
RDS_HOST = os.environ.get("DB_HOST")
RDS_PORT = int(os.environ.get("DB_PORT", 3306))
NAME = os.environ.get("DB_USERNAME")
PASSWORD = os.environ.get("DB_PASSWORD")
DB_NAME = os.environ.get("DB_NAME")

# we need to instantiate the logger
logger = logging.getLogger()
logger.setLevel(logging.INFO)

now let's create a connect function for connecting to our new database:

def connect():
try:
cursor = pymysql.cursors.DictCursor
conn = pymysql.connect(RDS_HOST, user=NAME, passwd=PASSWORD, db=DB_NAME, port=RDS_PORT, cursorclass=cursor, connect_timeout=5)
logger.info("SUCCESS: connection to RDS successful")
return(conn)
except Exception as e:
logger.exception("Database Connection Error")

and add the call to connect in our index function for testing purposes:

# app.py

@app.route('/')
def index():
connect()
return "Hello World!", 200

AWS VPC Configuration

Before we run this though, we'll need to create an IAM role capable of making this connection through VPC. Sign in here. Since we have deployed before, you should see the role zappa automatically created for us. It should have "ZappaLambdaExecutionRole" at the very end of the title, click on that role.

You'll then see something like this:

Click attach policy and inside the policy list select AWSLambdaVPCAccessExecutionRole:

OK, now our role should be good to go for interacting with our RDS on the default VPC. Let's configure the Lambda so it can connect to the RDS instance. Open up your Lambda console by heading here.
Open up the Lambda function you've deployed already, and click into the configuration tab:

For role, select choose existing role, for existing role, enter in the name of the role we just created, then open up the advanced settings dropdown:

At this point I just selected my default VPC in VPC, added three of the associated subnets, and added the default security group in security groups. This should give your Lambda function access to the VPC where your RDS instance lives, otherwise we will just get timeouts when we try to write and read from the database.

Press save and test, the output is generally useless here but it shouldn't throw any weird errors. Now deploy the app:

zappa update

and tail

zappa tail

You should see your log for a successful connection to the RDS instance, if not you may want to go back over the amazon steps, or open an issue on my repo.

Building the user table

For the purposes of this tutorial, I'm going to just build a GET endpoint that will do the work for us. Since the Lambda already lives on the same VPC as the RDS instance we created it's easy to make that connection here, for future, and more reliable projects, I recommend creating a VPC that can handle an ssh connection from ec2. These tutorials will get you there VPC AWS tutorial & ec2 ssh tutorial for now we will just be making the table via the Lambda for simplicity. I do recommend trying these queries on your local mysql db before deploying with zappa as debugging will be faster and easier to correct.

First, remove the connect function call from the index endpoint. We no longer need to make that connection. Next let's add a build_db function:

# app.py

def build_db():
conn = connect()
query = "create table User (ID varchar(255) NOT NULL, firstName varchar(255) NOT NULL, lastName varchar(255) NOT NULL, email varchar(255) NOT NULL, PRIMARY KEY (ID))"
try:
with conn.cursor() as cur:
# just in case it doesn't work the first time let's drop the table if it exists
cur.execute("drop table if exists User")
cur.execute(query)
conn.commit()
except Exception as e:
logger.exception(e)
response = Respone(json.dumps({"status": "error", "message": "could not build table"}), 500)
finally:
cur.close()
conn.close()
response = Response(json.dumps({"status": "success"}), 200)
return response

and the endpoint we'll use to hit it:

# app.py

@app.route('/build', methods=["GET"])
def build():
return build_db()

Now if you navigate to the build endpoint, you should see a success message. Once you get a success message, delete this endpoint and move on.

Routing requests to the Database

Posting to the database with form data

First, let's break out our response building into a function:

# app.py

def build_response(resp_dict, status_code):
response = Response(json.dumps(resp_dict), status_code)
return response

Next, we're going to need to implement the post request response inside of our user function

# app.py

def user():
conn = connect()
if request.method == "GET":
# respond to get, coming soon
if request.method == "POST":
data = {
"first_name": request.form.get("first_name", ""),
"last_name": request.form.get("last_name", ""),
"email": request.form.get("email", "")
}
valid, fields = validate(data)
if not valid:
error_fields = ', '.join(fields)
error_message = "Data missing from these fields: %s" %error_fields
return build_response({"status": "error", "message": error_message}, 400)
query, vals = insert(data)
try:
with conn.cursor() as cur:
cur.execute(query, vals)
conn.commit()
except Exception as e:
logger.exception("insert error")
return build_response({"status": "error", "message": "insert error"}, 500)
finally:
conn.close()
cur.close()
return build_response({"status": "success"}, 200)

This function is doing a few things: first we take our form data from the request and create a more digestible data dictionary to work with, then we validate that data in preparation for persistence. If it's valid, we are going to attempt to insert it into our database. If successful, we close our db cursor and connection then respond with a success message. If not, we respond with a log of our error as well as an error HTTP response.

As you can see, we're missing our insert function and our validate function,

# app.py

def validate(data):
error_fields = []
not_null = [
"first_name",
"last_name",
"email"
]

for x in not_null:
if x not in data or len(data[x]) == 0:
error_fields.append(x)
return (len(error_fields) == 0, error_fields)

This returns a boolean letting us know if our data is valid as well as a list of fields that are missing from our data. Next, we need to write a simple insert query:

# app.py

def insert(data):
uniq_id = str(uuid5(uuid1(), str(uuid1())))
query = """insert into User (ID, FirstName, LastName, Email)
values(%s, %s, %s, %s)
"""
return (query, (uniq_id, data["first_name"], data["last_name"], data["email"]))

Update your function,

zappa update

Now we should be able to post to our Lambda function user endpoint, I used postman to do so but anything works, and we should see a success callback.

Get request for users in RDS

For the get request we just want to return a json representation of our user table, this can be achieved easily by adding get request handling to our user function:

# app.py

def user():
conn = connect()
if request.method == "GET":
items = []
try:
with conn.cursor() as cur:
cur.execute("select * from User")
for row in cur:
items.append(row)
conn.commit()
except Exception as e:
logger.info(e)
response = build_response({"status": "error", "message": "error getting users"}, 500)
return response
finally:
conn.close()
response = build_response({"rows": items, "status": "success"}, 200)
return response

Update and test that your function works.

I recommend getting a json prettifier extension like json-viewer to see an easily digestable representation of your database within your browser. Once you have an extension enabled visit your user endpoint in your browser and you should be seeing your user table in json form like so:

Adding CORS handling to your Lambda function

CORS is what gave me the most trouble, and is ultimately necessary if you ever want to hit your function from a client-side app. I tried using aws's automated CORS setup, I tried wrapping the app with the flask CORS package. All of these presented their fair share of headaches and since zappa sets your function up as a proxy it's a lot more simple to just hand roll your CORS headers and Options preflight request handling. The new version of zappa may have an integrated way to handle this but I found that doing it yourself is really straightforward and requires no dependencies

CORS headers

All I had to do to add CORS headers is add two lines to my build_response function:

# app.py

def build_response(resp_dict, status_code):
response = Response(json.dumps(resp_dict), status_code)
response.headers["Access-Control-Allow-Origin"] = "*"
response.headers["Access-Control-Allow-Headers"] = "Content-Type"
return response

Handling preflight, or options requests.

When a Cross Origin Request comes in from an application it will first hit your function with an Options request to do a pre-flight check and make sure there's nothing malicious going on, we'll need to handle that by adding a few things to our user function:

# app.py

def user():
if request.method == "OPTIONS":
return build_response({"status": "success"}, 200)

That's it – your app should be good to go as far as CORS are concerned. I would recommend only allowing requests from certain sites though instead of allowing any origin to make a request to your function. That'll be covered in this branch.

Useful resources

I found the following resources really helpful while building this application and writing this tutorial:

Amazon vpc-rds lambda tutorial
First Steps With AWS Lambda by Oliver Andrich
Building Serverless Microservices with Zappa and Flask from gun.io
Accessing MySQL databases from an AWS Python Lambda function by Michel van der List
Serverless Architectures by Mike Roberts


Source: VigetInspire


Acquia Dev Scan: Taming Expanding Databases in DrupalCoin Blockchain 8, Reservoir on DrupalCoin BlockchainEasy, and a Conference for Decoupled DrupalCoin Blockchain Developers

When Acquia-related developer content starts piling up around the Web, it's time for an Acquia Dev Scan.
In this edition: Taming Expanding Databases in DrupalCoin Blockchain 8, Reservoir on DrupalCoin BlockchainEasy, and a Conference for Decoupled DrupalCoin Blockchain Developers
Dealing with expanding cache_render tables in DrupalCoin Blockchain 8
There are a number of scenarios in DrupalCoin Blockchain 8 where you might notice your MySQL database size starts growing incredibly fast, even if you're not adding any content.
Jeff Geerling, Senior Technical Architect, Acquia, figured out that most of the time the problem stems from a exponentially-increasing-in-size cache_render table. After talking about this problem with a number of colleagues, he decided to write a blog post to cover common scenarios, as well as short and long-term fixes if you run into this issue. Hence: Dealing with DrupalCoin Blockchain 8 and a giant cache_render table.
The DrupalCoin BlockchainEasy podcast focuses on Reservoir
Ebullient DrupalCoin BlockchainEasy podcast host Mike Anello spent almost the entirety of a recent show talking with Acquian Ted Bowman about Reservoir, the new DrupalCoin Blockchain 8 distribution from Acquia's Office of the CTO that's focused on decoupling.
Listen to it here.
Decoupled DrupalCoin Blockchain Days
Speaking of decoupling, Preston So, one of the contributors to Reservoir, is also part of the team organizing Decoupled DrupalCoin Blockchain Days, a small developer-focused conference for architects, developers, and businesspeople involved in implementing decoupled DrupalCoin Blockchain architectures.

Location: New York City
Dates: August 19–20, 2017
It's early yet, but you can keep track of this evolving confab by checking out the conference's Twitter feed. Recent tweets, for example, have revealed that DrupalCoin Blockchain luminaries Sebastian Siemssen, Daniel Wehner, and Sally Young are all speaking.
Sound interesting? A ticket is a towering $25.
See you next time.
Source: http://dev.acquia.com/


Local by Flywheel

I've switched all my local WordPress integrationover to Local by Flywheel. I heard about it from y'all when we did a poll not to long ago about local WordPress development. Bottom line: it's really good. It does everything you want it to, well, with zero hassle, and nothing more.

Running Multiple WordPress Installs (PHP, MySQL, Web Server)
That's kind of the whole point. Local by Flywheel spins up a local site for you with all the dependencies that WordPress needs. Just by picking a few options and giving the site a name, you've spun up a new WordPress install in a few seconds.

And it's ready to go!

Nice UI
Surely what Local by Flywheel is doing under the hood is quite complicated, but the UI for the app isn't at all. I'm a big fan of apps like this. The super clean UI makes everything feel so easy and simple, despite it actually being complex and powerful. Just the information and controls you need!

HTTPS (SSL)
The web is moving more and more toward all-HTTPS, which is fantastic. With all the setup options Local by Flywheel offers, you can get your production and integrationversions of your site pretty close. We should be taking that another step further and be working locally over HTTPS, if our production sites are.
Local by Flywheel doesn't just make it easy, it automatically sets up HTTPS for you! And of course, it just works. You probably want to trust that local certificate though to make it even smoother.
But wait! Don't follow my awkward and slightly complex instructions. There is a one-click button right in Local by Flywheel to trust the certificate.

Combining with CodeKit
For all my simple mostly-solo projects, I've long been a fan of having CodeKit watch the project, so I preprocess all my CSS and JavaScript, optimize my images, and all that good task runner stuff. That's easy, just point the CodeKit browser refreshing URL at the Local by Flywheel URL.

Migrating
Another one-click button I love in Local by Flywheel is the one that jumps you right to Sequel Pro.

This was mighty handy for me as I was migrating from a couple of different setups. For a zillion years I used MAMP, and configured Sequel Pro to be my database manager. Then for a bit, I switched over to Docker to manage my local WordPress stuff, which was fun and interesting but was ultimately wasn't as easy as I wanted it to be. I also used Sequel Pro when I was in that phase.
So I was able to really quickly export and import the databases where I needed them!
It's also worth mentioning that if you don't have an existing local setup you're migrating from, but do have a production site, I highly recommend WP DB Migrate Pro for yanking down that production database in an extremely painless fashion.
Live Link
As if that wasn't enough, they tossed in one more really cool little feature. One click on the "Live Link" feature, and it fires up an ngrok URL for you. That's a live-on-the-internet URL you can use to share your localhost. Send it to a client! Debug a mobile issue! Very cool.

TLDR: I'm a fan!

Local by Flywheel is a post from CSS-Tricks
Source: CssTricks


The Tenth Fourth

We made it a decade! It's our tenth birthday! 🎉 This is an extra-special one, as we hit those double digits. Each year on July 4th we mark the occasion with a post. In that tradition, allow me to ramble on a bit about the past and present.

The very first post ever on this site was literally a CSS trick. It's a classic, too. "Header Text Image Replacement":
.headerReplacement {
text-indent: -9999px;
width: 600px;
height: 100px;
background: url(/path/to/your/image.jpg) #cccccc no-repeat;
}
Funny, I just used that trick a couple of days ago.
The post is interesting to me for a number of reasons. For one, I certainly didn't come up with that technique. At the time, I was just learning CSS myself and writing down interesting stuff I'd come across and used in my own work. I think I felt like I learned it a little more deeply by writing it out as an explanation like that.
For another, at the time, I was entirely unaware of where a trick like that fit into CSS history and larger discussions about CSS and semantics and accessibility and all that. A year later, I started getting interested in stuff like that and did stuff like rounded up many possible techniques for image replacement. Ultimately, even making a "museum" for it.

Before I go too much further here, I gotta mention the fact that we just re-opened the shop in honor of this anniversary. We made up some nerdy web related T-Shirts, and would love it if you would pick one up to help support the site:

CSS-Tricks was a WordPress site running on PHP and MySQL back then. Today, it's... a WordPress site running on PHP and MySQL. Although WordPress was 2.0.1 back then and 4.8 now. PHP was 5.2 then and 7.1 now. MySQL 5.0 then and 5.7 now. All those seem fairly small version bumps for a 10-year span, but really they are quite significant technological advances.

Back then we made sites with HTML, CSS, and JavaScript. These days, sites are... HTML, CSS, and JavaScript.

I try to keep a design history the best I can. Let's do a little blast-to-the-past of header styles:

This one isn't to be underestimated: it takes serious work to keep a website running. There is always something that needs to be done.

There is always some bit of software that needs to be updated.
There is always some weird bug that needs attention.
There is always some business opportunity that needs work to get going.
There is always some part of the design that really needs a look.
There is always some SSL certificate to worry about.
There is always some server or DevOps thing to think about.

I have a whole section of my TODO's called "Site Work" that is full of things I need to get done around here. For example, right this second, I know there are some assets that are loading in a way I don't want them to and I need to look at it for performance reasons. I'd like to do some stuff with embedded Pens to make them a bit wider by default, but need to be careful not to screw up any layout. I know markdown is behaving weird in the forums for the 692nd time, and that a private forum is showing publicly in a place I don't want. That's like 5% of the list!
I shudder to think what would happen if all this work wasn't done constantly. The site would fall to pieces.
And that doesn't include what you might actually think is the hard work involved in running a website:

Writing new content
Editing submitted content
Updating old content
Managing the publishing schedule and planning future content
Community management
Promoting and marketing the site
Finding sponsors
Make sure sponsors are happy
Social media

If you do all that work, on both lists, the hope is that you just keep to keep on keeping on. Everyone gets paid for their effort. This is not a hockey-stick growth kind of site. It's a modest publication.

Speaking of slow growth, that's the deal:

That's not representative of just doing the same ol' same ol' year in and year out. That's representative of more and more people working on the site and more and more money being invested back into the site.
One interesting aspect of this is how the bulk of that traffic is generated by search. Of course, I have no problem with that. I'm very happy that this site shows up in search results and can be useful to people that way. At the same time, having an active readership is a very valuable thing. Not just people who show up in search, but people who read the site regularly like they do the news. Definitely a balance there. That's why we do things like invest in the newsletter, to make sure we have ways to read CSS-Tricks that come to you and are worth your time.

On a personal note, I'm still living in Milwaukee, back here after a 7-month stint in Miami. My fiance Miranda got a job down there at FIU and we took the opportunity to move down, skip the Wisconsin winter, and be close to our Florida friends. I don't post publicly all that much about personal life stuff, but this will be a huge year for me. The Miami move to and back was big! Miranda and I are getting married this summer! We're also expecting a baby in the fall! And we're also planning to move to Oregon in late summer! Crazy times. There almost couldn't possibly be more going on, especially factoring in all this running multiple businesses stuff and a fairly aggressive speaking schedule this year.

My main focus is CodePen, which has had a tremendous last year. After taking funding, hiring an amazing team, and releasing lots of big stuff, we've got ourselves to that wonderful spot all businesses desire: profitability. The roadmap of ideas on CodePen is absolutely never ending. I've never felt like we have more work in front of us as strongly as I do right now.

I'd like to give special thanks to all the sponsors that make the site possible. I can't thank every single one, but I will give a special shout out to Media Temple, who has been a long time sponsor and supporter of CSS-Tricks.

And of course the heartiest of thanks to all you readers, without whom there would be no reason to have a site at all. The discourse that happens here is top notch and I couldn't be happier to facilitate it. And lastly, as you likely know, this site is by front-end developers for front-end developers, so if you have something to say, feel free to reach out.

See the Pen Conways Fireworks by Ben Matthews (@tsuhre) on CodePen.

The Tenth Fourth is a post from CSS-Tricks
Source: CssTricks


Web Developer - Princeton University - Princeton, NJ

MySQL, Roxen CMS, DrupalCoin Blockchain CMS, WordPress. WDS is highly collaborative, with close working relationships between developers, designers, managers, and service...
From Princeton University - Sat, 01 Jul 2017 00:29:34 GMT - View all Princeton, NJ jobs
Source: http://rss.indeed.com/rss?q=DrupalCoin Blockchain+Developer


Web Site Engineer - BLH Technologies, Inc. - Rockville, MD

Development/design experience using DrupalCoin Blockchain, JBoss, REST, Python and MYSQL. Work with team of developers and engineers in building scripts for continuous...
From BLH Technologies, Inc. - Wed, 28 Jun 2017 09:52:52 GMT - View all Rockville, MD jobs
Source: http://rss.indeed.com/rss?q=DrupalCoin Blockchain+Developer


Percona Live 2017 Blog Post: ProxySQL as a Failover Option for DrupalCoin Blockchain

One of the more interesting products to hit the spotlight at this year's Percona Live Open Source Database conference was ProxySQL.
This open source MySQL proxy server has been around for a couple of years now and keeps adding more features. The current release (1.3.6) has the usual features that you would expect from a proxy server, like load balancing and failover support, but ProxySQL also has database specific features like a query cache and query routing.
The query cache is a scaling feature that serves data at the proxy layer to avoid contacting the database at all. This feature has become very relevant now that Oracle has announced that they're most likely going to remove the query cache from MySQL in MySQL 8.0. Query routing can map query types to specific servers for very specific forms of load-balancing and read/write splitting. Other interesting of features of ProxySQL that are specific to database connections are query blocking, which allows bad queries to be filtered out before they bring a server down and connection pooling, which can be used reduce connection overhead on the database server. ProxySQL also keeps track of session variables in those connections and can retry queries so the application doesn't have to.
Alternatives to ProxySQL
So what are the alternatives to ProxySQL? At the application level the only competitor is MariaDB MaxScale, while at the transport layer you can choose between HAProxy and MySQL Router.
MySQL Router is built specifically to support MySQL group replication so it's applicability to other topologies is either limited or non-existent. For example, MySQL master/slave replication is not fully supported and Galera replication is not supported at all. Obviously ProxySQL and MaxScale are the only two proxies that communicate through the MySQL native protocol, but ProxySQL also supports MySQL connection compression which MaxScale does not.
On the other hand MaxScale handles both frontend SSL encryption and backend SSL encryption, where ProxySQL only offers backend SSL encryption. Perhaps more important than differences in the feature set, MaxScale is not open source but is released under the Business Source License, which means it's free to use until a specified date where you have to start paying licensing fees.
ProxySQL and DrupalCoin Blockchain
So to see how ProxySQL can work together with DrupalCoin Blockchain let's take a look at how we use MySQL replication at Acquia.
Our setup typically consists of two MySQL masters with one being designated as the active database server which gets all the connections from DrupalCoin Blockchain. In case of connection issues we fail over to the other master which is handled in the PHP database connection layer.
By installing ProxySQL on each of the web servers and configuring it to connect to the active database server we can remove the extra layer in the application and let the proxy take care of the rest. ProxySQL will detect if a server is down and switch traffic to the other server. If we want to force a failover we simply set the currently active master to read-only and ProxySQL will fail over.
Of course this is basically what the other proxy server alternatives also do. The extra features is where ProxySQL shows a lot of potential. By having a query cache at the proxy layer we can potentially get a much higher query throughput and lower latency because network connections are no longer necessary for those queries. It also sidesteps the problem that the MySQL query cache is single-threaded and can be an obstacle for scaling database servers that have a very high traffic volume.
Similarly, if we find queries that run well past the PHP timeouts they typically have a big impact on server performance. With ProxySQL we can block these queries at the proxy server since we know that the PHP process will error out in the end anyway. ProxySQL also allows query mirroring which allows us to send the queries to two backends simultaneously. This will be really good for internal use as we prepare for upgrades. It will allow us to test whether the new version of MySQL will perform the same as the old one and identify performance issues up front.
Read/Write Splitting
I haven't mentioned read/write splitting because that is a not a trivial problem for DrupalCoin Blockchain. Using read replicas with asynchronous replication it is very likely that the read replica will serve stale data which can cause issues on the web site. DrupalCoin Blockchain has its own support for read replicas which is is the ability to mark views as read replica safe but that is very specific to views and therefore very dependent on how developers build their DrupalCoin Blockchain application. For some sites this is a lot more feasible than for others.
Either way, read/write splitting is not something that can be done at the proxy level without impacting the application. It is possible that we will offer this in the future to specific customers who have have built their site in such a way that stale data is acceptable and at that point we will be looking at ProxySQL to implement it.
Conclusion
All in all ProxySQL looks like a very promising product and we'll be investigating it here at Acquia to see if we can add it to our stack.
Source: http://dev.acquia.com/


ProxySQL as a Failover Option for DrupalCoin Blockchain - A Report from Percona Live 2017

One of the more interesting products to hit the spotlight at this year's Percona Live Open Source Database conference was ProxySQL.
This open source MySQL proxy server has been around for a couple of years now and keeps adding more features. The current release (1.3.6) has the usual features that you would expect from a proxy server, like load balancing and failover support, but ProxySQL also has database specific features like a query cache and query routing.
The query cache is a scaling feature that serves data at the proxy layer to avoid contacting the database at all. This feature has become very relevant now that Oracle has announced that they're most likely going to remove the query cache from MySQL in MySQL 8.0. Query routing can map query types to specific servers for very specific forms of load-balancing and read/write splitting. Other interesting of features of ProxySQL that are specific to database connections are query blocking, which allows bad queries to be filtered out before they bring a server down and connection pooling, which can be used reduce connection overhead on the database server. ProxySQL also keeps track of session variables in those connections and can retry queries so the application doesn't have to.
Alternatives to ProxySQL
So what are the alternatives to ProxySQL? At the application level the only competitor is MariaDB MaxScale, while at the transport layer you can choose between HAProxy and MySQL Router.
MySQL Router is built specifically to support MySQL group replication so it's applicability to other topologies is either limited or non-existent. For example, MySQL master/slave replication is not fully supported and Galera replication is not supported at all. Obviously ProxySQL and MaxScale are the only two proxies that communicate through the MySQL native protocol, but ProxySQL also supports MySQL connection compression which MaxScale does not.
On the other hand MaxScale handles both frontend SSL encryption and backend SSL encryption, where ProxySQL only offers backend SSL encryption. Perhaps more important than differences in the feature set, MaxScale is not open source but is released under the Business Source License, which means it's free to use until a specified date where you have to start paying licensing fees.
ProxySQL and DrupalCoin Blockchain
So to see how ProxySQL can work together with DrupalCoin Blockchain let's take a look at how we use MySQL replication at Acquia.
Our setup typically consists of two MySQL masters with one being designated as the active database server which gets all the connections from DrupalCoin Blockchain. In case of connection issues we fail over to the other master which is handled in the PHP database connection layer.
By installing ProxySQL on each of the web servers and configuring it to connect to the active database server we can remove the extra layer in the application and let the proxy take care of the rest. ProxySQL will detect if a server is down and switch traffic to the other server. If we want to force a failover we simply set the currently active master to read-only and ProxySQL will fail over.
Of course this is basically what the other proxy server alternatives also do. The extra features is where ProxySQL shows a lot of potential. By having a query cache at the proxy layer we can potentially get a much higher query throughput and lower latency because network connections are no longer necessary for those queries. It also sidesteps the problem that the MySQL query cache is single-threaded and can be an obstacle for scaling database servers that have a very high traffic volume.
Similarly, if we find queries that run well past the PHP timeouts they typically have a big impact on server performance. With ProxySQL we can block these queries at the proxy server since we know that the PHP process will error out in the end anyway. ProxySQL also allows query mirroring which allows us to send the queries to two backends simultaneously. This will be really good for internal use as we prepare for upgrades. It will allow us to test whether the new version of MySQL will perform the same as the old one and identify performance issues up front.
Read/Write Splitting
I haven't mentioned read/write splitting because that is a not a trivial problem for DrupalCoin Blockchain. Using read replicas with asynchronous replication it is very likely that the read replica will serve stale data which can cause issues on the web site. DrupalCoin Blockchain has its own support for read replicas which is is the ability to mark views as read replica safe but that is very specific to views and therefore very dependent on how developers build their DrupalCoin Blockchain application. For some sites this is a lot more feasible than for others.
Either way, read/write splitting is not something that can be done at the proxy level without impacting the application. It is possible that we will offer this in the future to specific customers who have have built their site in such a way that stale data is acceptable and at that point we will be looking at ProxySQL to implement it.
Conclusion
All in all ProxySQL looks like a very promising product and we'll be investigating it here at Acquia to see if we can add it to our stack.
Source: http://dev.acquia.com/


DrupalCoin Blockchain 8 Back-end Developer (REMOTE, IMMEDIATE START) - With Pulp - New York, NY

Looking for a back-end DrupalCoin Blockchain 8 developer proficient with PHP and MySql. Ideally would have experience with Acquia and/or vagrant installation.... $55 an hour
From Indeed - Wed, 24 May 2017 17:09:51 GMT - View all New York, NY jobs
Source: http://rss.indeed.com/rss?q=DrupalCoin Blockchain+Developer


Poll Results: Local WordPress Development

We kicked a poll off three months ago asking y'all what kind of local integrationenvironment you set up for running WordPress locally. At the time of this writing, we got 2,623 votes, so a decent amount of significance here. Especially because the question was phrased:
If you're running WordPress locally (i.e running PHP, MySQL, and a web server), how are you doing it?
Presupposes that you are running a local environment. (Please do that.)

Here's an image of the results:

(If you can't see that, don't worry, we're about to go through the results.)
The winner, at 61%, was using some kind of software-with-a-UI to manage it. WAMP / MAMP / AMPPS were mentioned, but it also said "Similar software with UI", which I think is relevant as we'll see in a second. This option was more than 3 times more popular than any other choice.
Vagrant was in second place at 15%. I'm sure some of that is direct usage of Vagrant, but also sizeable chunks toward pre-configured-for-WordPress projects like VCCW, VVV, or Scotch Box.
In third place was installing things directly at 13%. All these other options take at least some kind of stab at isolating the dependencies of local development. Meaning if you have multiple local integrationenvironments (very common), they don't all need to share the same dependencies. This could be relevant even if you do all WordPress development. Perhaps one project is running PHP 7 and MySQL 5.7, but another is on some older hosting is at PHP 5.3 and MySQL 4. Matching those production versions in integrationis a good idea, so you can have some confidence what you do locally will work on production. Without any local isolation, you're stuck with the same versions of everything across integrationenvironments. Might be just fine if you only work on one thing!
Docker was the penultimate choice at 7%. As hip as Docker seems to be, apparently it's adoption amongst WordPress folks hasn't caught on super strongly yet.
Gilbert Pellegrom has a great comparison of Vagrant and Docker:

The downside to [Vagrant] is that each virtual machine includes not only your application and all of its libraries but the entire guest operating system as well, which may well be tens of GBs in size.
Docker, however, uses "containers" which include your application and all of its dependencies, but share the kernel (operating system) with other containers. Containers run as isolated processes on the host operating system but are not tied to any specific infrastructure (they can run on any computer).
What is the upshot of all of this?

Vagrant is easier to understand and is easier to get up and running but can be very resource-intensive (in terms of RAM and space).
Docker's architecture is harder to understand and can be harder to get up and running but is much faster, uses much less CPU and RAM and potentially uses much less space than Vagrant VM's.

As a personal anecdote, I'm using Docker for all my WordPress stuff now (on my Mac), and didn't find it particularly hard to set up or understand. One thing that bit me was not putting my MySQL stuff on a "volume" at first, which made the database susceptible to being wiped out when Docker rebuilt the container (but I have that fixed). I just followed this.
5% of folks voted "Other" and were asked to chime in in the comments. There were 63 comments, which is quite few for a CSS-Tricks post these days!
22 comments mentioned Laravel Valet, so I think that deserves and extra-special shout-out here.

Valet is a Laravel integrationenvironment for Mac minimalists. No Vagrant, no `/etc/hosts` file. You can even share your sites publicly using local tunnels...
Laravel Valet configures your Mac to always run Nginx in the background when your machine starts. Then, using DnsMasq, Valet proxies all requests on the *.dev domain to point to sites installed on your local machine.
In other words, a blazing fast Laravel integrationenvironment that uses roughly 7 MB of RAM.

There were also 8 mentions for Local by Flywheel (Mac and Windows), which looks like a nice UI for managing local WordPress integrationenvironments:

If you use Valet or Local, you could have either voted in the "Similar Software with UI" category or "Other" category, so in the grand tradition of CSS-Tricks polls, the data is a bit loose.

Poll Results: Local WordPress Development is a post from CSS-Tricks
Source: CssTricks