- Sign up for the Cloud Tasks HTTP Targets Alpha
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
FROM node:10-slim | |
WORKDIR /usr/src/app | |
COPY package*.json ./ | |
RUN npm install --only=production | |
COPY . ./ | |
CMD [ "npm", "start" ] |
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
const {TranslationServiceClient} = require('@google-cloud/translate').v3beta1; | |
const translationClient = new TranslationServiceClient(); | |
exports.helloTranslate = async (req, res) => { | |
try { | |
const request = { | |
parent: translationClient.locationPath(process.env.TRANSLATE_GCP_PROJECT, process.env.TRANSLATE_LOCATION), | |
contents: ['Hello World!'], | |
mimeType: 'text/plain', | |
sourceLanguageCode: 'en-US', |
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
gcloud beta tasks create-http-task sitemap-rebuild --queue my-queue \ | |
--url "https://cms.example123-uc.a.run.app/sitemap-rebuild" \ | |
--schedule-time 2019-09-17T05:30:00Z |
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
gcloud beta tasks create-http-task --queue my-queue \ | |
--url "https://search.example123-uc.a.run.app?object=piano&color=red" \ | |
--header "Request-User-Id: user123" |
Yesterday saw a couple small releases to some of the Outrigger docker images.
The Outrigger Dashboard image is automatically spun up by rig start
and rig dashboard
,
which automatically checks for updates. THe Dashboard image has been updated to Bootstrap 4, and now has a shiny navbar to connect your
use of Outrigger with the various online resources related to it. Check out what it will look like in the
Navbar Pull Request.
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
# This Dockerfile uses multi-stage builds: https://docs.docker.com/engine/userguide/eng-image/multistage-build/ | |
# The builder image has all the dependencies necessary to assemble the website. | |
FROM node:8-alpine as builder | |
# The COPY operation looks to see if any of the source files changed since the last time the container was built. | |
# If not changed, it uses the cached copy of this operation. If it is changed, it performs the copy and all | |
# following steps for the builder, and for the COPY operation in the nginx image below. | |
COPY ./package.json ./package-lock.json /code/frontend/ | |
WORKDIR /code/frontend | |
RUN npm install |
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
{ | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"id": "http://www.api-dx.vm/schemata/node/article?_format=schema_json&_describes=hal_json", | |
"type": "object", | |
"title": "node:article Schema", | |
"description": "Use <em>articles</em> for time-sensitive content like news, press releases or blog posts.", | |
"properties": { | |
"nid": { | |
"type": "array", | |
"title": "ID", |
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
The individual files in this gist each have a unique trick to offer. They may be moved to official documentation or individual gists at a future date. | |
This file is mostly added because gists insist on titling the page with the alphabetically first file name, instead of the gist title. |
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
/** | |
* Customized site install routine. | |
* | |
* Used as part of grunt install. | |
* | |
* Place this file wherever custom grunt-drupal-tasks plugins are loaded, such as bin/grunt for an Outrigger Drupal project. | |
*/ | |
module.exports = function(grunt) { | |
// Modify the drush site-install component of the routine. |
NewerOlder