Skip to content

Instantly share code, notes, and snippets.

View jf-marquis-Adeo's full-sized avatar

Marquis jf-marquis-Adeo

View GitHub Profile
@jf-marquis-Adeo
jf-marquis-Adeo / metrics_ia.md
Last active February 25, 2026 18:10
metrics_ia.md
Health Indicator Evolution (2021–2025) Product Consequence
Cloned/Duplicate Code +116% (8% to 18%) Multiplies points of failure
Refactoring -60% (from 25% to <10%) Hardening/Sclerosis of the architecture
Code Churn (Rework < 2 weeks) +41% Chronic instability of new features

Keybase proof

I hereby claim:

  • I am jf-marquis-Adeo on github.
  • I am jfmarquis (https://keybase.io/jfmarquis) on keybase.
  • I have a public key whose fingerprint is CFB5 A821 A31F 832A 3C61 8D92 9A50 D56E CCF1 E7E3

To claim this, I am signing this object:

@jf-marquis-Adeo
jf-marquis-Adeo / encrypt
Created December 30, 2019 06:07
python encryption
python3 -c 'import base64; import os; print(base64.encodebytes(os.urandom(32)))'
@jf-marquis-Adeo
jf-marquis-Adeo / code create dataset finder
Created September 9, 2019 14:06
code create dataset
{
"payload":
{
"privacyLevel": "P3",
"description": "BigQuery implementation",
"technicalInformation": {
"datasetName": "all_adeo_asset_inventory",
"gcpProjectId": "dfdp-sre-data"
},
"code": "b-adeocomTenantGlobalInventory",
@jf-marquis-Adeo
jf-marquis-Adeo / gcs python
Created September 8, 2019 05:09
Python bucket snippet
#!/usr/bin/env python
# Copyright 2016 Google, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@jf-marquis-Adeo
jf-marquis-Adeo / parsing project in full_nam
Created September 3, 2019 05:23
bigquery forseti regexp
SELECT regexp_extract(full_name,r'\/project\/(.*?)\/') FROM `dfdp-sre-data.forsetiSecurityData.SecurityViolations`
python /Users/jean-francois.marquis/dataflow/scratch.py --runner DataflowRunner --project meta-securitycompliance --temp_location gs://cloudsql2bq/temp --region europe-west1
#notify Cloud Function
echo "launching cloud function"
gcloud beta pubsub topics publish projects/dfdp-sre-data/topics/Cloudsql2csv --message "Forseti inventory ok"
@jf-marquis-Adeo
jf-marquis-Adeo / bug python
Created June 5, 2019 19:35
code extract log org
Hi,
Sorry for my late answer.
There is a known issue with the client library: https://github.com/googleapis/google-cloud-python/issues/5514
The current workaround requires you that compiles the protobuffer protocol files and import them in your application in order to be able to parse the raw protobuffer.
The page
https://github.com/salrashid123/cloud_logging_datalab#python-protobuf-imports
shows how to do it but when I tried to replicate I realized that it
@jf-marquis-Adeo
jf-marquis-Adeo / commandes
Created May 27, 2019 13:24
audit org adeo.com
gcloud logging read 'logName: organizations/899064685583/logs/cloudaudit.googleapis.com%2Factivity' --freshness=4d --organization=899064685583 --format 'table(timestamp,protoPayload.methodName,protoPayload.authenticationInfo.principalEmail)'
526 gcloud logging read 'logName: organizations/899064685583/logs/cloudaudit.googleapis.com%2Factivity' --freshness=4d --organization=899064685583
527 gcloud logging read 'logName: organizations/899064685583/logs/cloudaudit.googleapis.com%2Factivity' --freshness=10d --organization=899064685583 --format 'table(timestamp,protoPayload.methodName,protoPayload.authenticationInfo.principalEmail)'
528 gcloud logging read 'logName: organizations/899064685583/logs/cloudaudit.googleapis.com%2Factivity' --freshness=10d --organization=899064685583