I hereby claim:
- I am skynewz on github.
- I am skynewz (https://keybase.io/skynewz) on keybase.
- I have a public key ASC3A0QNIzOr05kNumVLg6NbuzLoN-PMKt7AiR9AJTUANQo
To claim this, I am signing this object:
package main | |
import ( | |
"regexp" | |
"fmt" | |
"io/ioutil" | |
"os" | |
) | |
func main() { |
I hereby claim:
To claim this, I am signing this object:
variable "project_id" { | |
type = string | |
} | |
# On va chercher le projet number | |
data "google_project" "project" { | |
project_id = var.project_id | |
} | |
# On crer le topic qui reçoit les lettres mortes |
""" | |
Used to write logs on Stackdriver logging using the https://googleapis.dev/python/logging/latest/client.html | |
Detect if we are in Google Runtime environment and enable this logger or not | |
Change the default format | |
Append all urllib3 debug request into these loggers | |
https://stackoverflow.com/questions/16337511/log-all-requests-from-the-python-requests-module | |
https://github.com/psf/requests/issues/1297 | |
https://stackoverflow.com/questions/11820338/replace-default-handler-of-python-logger | |
https://stackoverflow.com/questions/879732/logging-with-filters |
{ | |
# Enable Debug mode | |
debug | |
# Disable admin API | |
admin off | |
} | |
localhost { | |
# https://caddyserver.com/docs/caddyfile/directives/push |
// validate ensure all required secrets are set up | |
func (secrets *s) validate(sub ...interface{}) error { | |
// Reflect it | |
v := reflect.ValueOf(*secrets) | |
if len(sub) > 0 { | |
// Recursive | |
v = reflect.ValueOf(sub[0]) | |
} | |
// Iterate over each fields and looks from empty string |
package main | |
import ( | |
"context" | |
"time" | |
log "github.com/sirupsen/logrus" | |
) | |
func main() { |
package main | |
import ( | |
"context" | |
"fmt" | |
"sync" | |
"time" | |
log "github.com/sirupsen/logrus" |
from flask import Flask, Request, make_response | |
def hello_http(request: Request): | |
"""HTTP Cloud Function. | |
Args: | |
request (flask.Request): The request object. | |
<https://flask.palletsprojects.com/en/1.1.x/api/#incoming-request-data> | |
Returns: | |
The response text, or any set of values that can be turned into a |
package main | |
import ( | |
"context" | |
"fmt" | |
"math/rand" | |
"os" | |
"time" | |
) |