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
| # File: .gitlab-ci.yml | |
| image: docker:latest | |
| stages: | |
| - deploy | |
| deploy: | |
| stage: deploy | |
| image: google/cloud-sdk | |
| services: |
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
| # garden.yml | |
| kind: Project | |
| name: flask-app | |
| environments: | |
| - name: dev | |
| providers: | |
| - name: kubernetes | |
| context: gke_fullstackgcp_us-central1-c_my-dev-cluster | |
| buildMode: cluster-docker | |
| defaultEnvironment: dev |
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
| # Configure GCP project | |
| provider "google" { | |
| project = "terraform-cr" | |
| } | |
| # Deploy image to Cloud Run | |
| resource "google_cloud_run_service" "mywebapp" { | |
| name = "mywebapp" | |
| location = "us-central1" | |
| template { |
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 python:3.7-stretch | |
| RUN apt-get update -y | |
| RUN apt-get install -y python-pip python-dev build-essential | |
| COPY . /app | |
| WORKDIR /app | |
| RUN pip install -r requirements.txt | |
| ENTRYPOINT ["python"] | |
| CMD ["main.py"] |
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
| runtime: python37 |
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 flask import jsonify | |
| def hello_world(request): | |
| """Responds to any HTTP request. | |
| """ | |
| return jsonify({"message": "Hello World"}) |
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
| <template> | |
| <button id="upload_widget" class="cloudinary-button">Update Logo</button> | |
| </template> | |
| <script> | |
| methoods : { | |
| uploadWidget() { | |
| let myWidget = cloudinary.createUploadWidget( | |
| { |
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
| import time | |
| import jwt | |
| import json | |
| import requests | |
| import httplib2 | |
| # Permissions to request for Access Token | |
| scopes = "https://www.googleapis.com/auth/cloud-platform" | |
| # Length of token's validity |
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 python:3.7-stretch | |
| RUN apt-get update -y | |
| RUN apt-get install -y python-pip python-dev build-essential | |
| COPY . /app | |
| WORKDIR /app | |
| RUN pip install -r requirements.txt | |
| ENTRYPOINT ["python"] | |
| CMD ["app.py"] |
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
| /* | |
| * GL05IdleFunc.cpp: Translation and Rotation | |
| * Transform primitives from their model spaces to world space (Model Transform). | |
| */ | |
| // #include <windows.h> // for MS Windows | |
| #include <GL/glut.h> // GLUT, include glu.h and gl.h | |
| // Global variable | |
| GLfloat angle = 0.0f; // Current rotational angle of the shapes | |