Skip to content

Instantly share code, notes, and snippets.

View ashmore11's full-sized avatar

Scott Ashmore ashmore11

View GitHub Profile
@ashmore11
ashmore11 / gist:3783457
Created September 25, 2012 18:01
starter-template
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
<script src="js/script.js"></script>
</head>
<body>
<div id="main"></div>
</body>
</html>
@ashmore11
ashmore11 / mobile-media-query
Created December 11, 2012 11:14
mobile media query
@media only screen and (min-device-width : 320px) and (max-device-width : 480px)
Verifying my Blockstack ID is secured with the address 12p86jHcqTK8LUW6hx5W6SdjE67KoW3rSw https://explorer.blockstack.org/address/12p86jHcqTK8LUW6hx5W6SdjE67KoW3rSw
@ashmore11
ashmore11 / docker-compose.yml
Last active January 20, 2021 10:28
Next Strapi Cloud Run mySQL
version: "3.7"
services:
next-strapi-cloud-run-mysql:
image: mysql:5.7
container_name: next-strapi-cloud-run-mysql
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: cms
ports:
- "3308:3306"
@ashmore11
ashmore11 / database.js
Last active January 5, 2021 09:37
Next Strapi Cloud Run (strapi database config)
module.exports = ({ env }) => ({
defaultConnection: 'default',
connections: {
default: {
connector: 'bookshelf',
settings: {
client: 'mysql',
database: env('DB_NAME'),
host: env('DB_HOST'),
port: env.int('DB_PORT'),
@ashmore11
ashmore11 / docker-compose.yml
Last active January 20, 2021 10:28
Next Strapi Cloud Run (docker compose cms)
version: "3.7"
services:
next-strapi-cloud-run-mysql:
image: mysql:5.7
container_name: next-strapi-cloud-run-mysql
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: cms
ports:
- "3308:3306"
@ashmore11
ashmore11 / docker-compose.yml
Last active January 20, 2021 10:28
Next Strapi Cloud Run (docker compose next.js)
version: "3.7"
services:
next-strapi-cloud-run-mysql:
image: mysql:5.7
container_name: next-strapi-cloud-run-mysql
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: cms
ports:
- "3308:3306"
@ashmore11
ashmore11 / next.config.js
Created January 5, 2021 12:14
Next Strapi Cloud Run (next.js config)
module.exports = {
env: {
CMS_GRAPHQL_URL: process.env.CMS_GRAPHQL_URL,
},
}
@ashmore11
ashmore11 / index.js
Created January 5, 2021 13:45
Next Strapi Cloud Run (next.js getStaticProps)
import { request, gql } from 'graphql-request'
export const getStaticProps = async () => {
const query = gql`
{
test {
title
}
}
`;
@ashmore11
ashmore11 / variables.tf
Last active January 19, 2021 17:46
Next Strapi Cloud Run (Terraform Variables)
variable "gcp_project_name" {
type = string
description = "Name of the Google Cloud Platform Project to be created."
default = "next-strapi-cloud-run"
}
variable "gcp_region" {
type = string
description = "Google Cloud Region that the project should be created within"
default = "europe-west1"