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
#!/usr/bin/python | |
from apiclient.discovery import build | |
import httplib2 | |
from oauth2client.service_account import ServiceAccountCredentials | |
from oauth2client.client import GoogleCredentials | |
import logging | |
import json | |
import sys |
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
# virtualenv env | |
# source env/bin/activate | |
# pip install jupyter matplotlib pandas google-cloud-logging | |
#%% | |
import collections |
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
package com.test; | |
import com.google.cloud.storage.Bucket; | |
import com.google.cloud.storage.Storage; | |
import com.google.cloud.storage.StorageOptions; | |
import java.util.Collection; | |
import java.util.Iterator; | |
import java.io.FileInputStream; | |
import com.google.auth.oauth2.GoogleCredentials; |
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 os | |
import pprint | |
from google.cloud import logging | |
from google.cloud.logging import ASCENDING | |
from google.cloud.logging import DESCENDING | |
pp = pprint.PrettyPrinter(indent=1) | |
FILTER = 'resource.type="gae_app" AND logName="projects/mineral-minutia-820/logs/appengine.googleapis.com%2Frequest_log" AND protoPayload.resource="/"' |
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
# build stage | |
FROM microsoft/dotnet:2.0.0-preview1-sdk-jessie AS build-env | |
ADD . /app | |
WORKDIR /app/ | |
RUN dotnet restore | |
RUN dotnet publish -c Release | |
# final stage | |
FROM microsoft/dotnet:2.0.0-preview1-runtime-jessie | |
COPY --from=build-env /app /app/ | |
WORKDIR /app/ |

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
private static void Execute(IApplicationBuilder app) | |
{ | |
app.Run(async context => | |
{ | |
_logger.LogInformation("HTTP handler called.."); | |
await context.Response.WriteAsync("hello from .NET"); | |
}); | |
} |
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
sudo su - | |
wget https://download.docker.com/linux/debian/dists/jessie/pool/edge/amd64/docker-ce_17.05.0~ce-0~debian-jessie_amd64.deb | |
dpkg -i docker-ce_17.05.0~ce-0~debian-jessie_amd64.deb | |
(press Y, when prompted) | |
service docker restart | |
exit |
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
package main | |
//https://github.com/GoogleCloudPlatform/google-cloud-go/issues/720#issuecomment-320798620 | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
"time" |
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
apt-get update -y && apt-get install -y unzip curl python openssl python-setuptools python-pip python-dev build-essential nghttp2 libnghttp2-dev libssl-dev | |
curl -OL https://curl.haxx.se/download/curl-7.54.0.tar.bz2 && \ | |
tar -xvjf curl-7.54.0.tar.bz2 && \ | |
cd curl-7.54.0 && \ | |
./configure --with-nghttp2 --with-ssl && \ | |
make && \ | |
make install && \ | |
ldconfig |
OlderNewer