Skip to content

Instantly share code, notes, and snippets.

View thierryturpin's full-sized avatar

Thierry Turpin thierryturpin

  • Belgium
  • 13:15 (UTC +02:00)
View GitHub Profile
@thierryturpin
thierryturpin / gist:f521fca2a43fba755ff6d1dc888399a3
Created October 13, 2023 08:48
Sharepoint download via Python
"""
Demonstrates how to download a file from SharePoint site
"""
import os
import tempfile
from office365.sharepoint.client_context import ClientContext
test_site_url = "https://tturpin.sharepoint.com/sites/Turpin"

Keybase proof

I hereby claim:

  • I am thierryturpin on github.
  • I am thierryturpin (https://keybase.io/thierryturpin) on keybase.
  • I have a public key ASDh1EskyhzqE00WBhudi_c5-a2MaZhFEPhMogZoDEfQSQo

To claim this, I am signing this object:

@thierryturpin
thierryturpin / mongodb-dbo-orders.json
Last active October 8, 2021 11:04
MongoDB sink connector
{
"config": {
"behavior.on.null.values": "ignore",
"collection": "ORDERS",
"connection.uri": "mongodb://user:password@172.31.60.87",
"connector.class": "com.mongodb.kafka.connect.MongoSinkConnector",
"connector.client.config.override.policy": "All",
"database": "dev",
"document.id.strategy": "com.mongodb.kafka.connect.sink.processor.id.strategy.PartialValueStrategy",
"document.id.strategy.partial.value.projection.list": "pk_order_id",
@thierryturpin
thierryturpin / debezium.log
Created October 7, 2021 14:48
debezium log
connect | [2021-09-29 12:19:47,148] INFO No previous offset has been found (io.debezium.connector.sqlserver.SqlServerSnapshotChangeEventSource)
connect | [2021-09-29 12:19:47,148] INFO According to the connector configuration both schema and data will be snapshotted (io.debezium.connector.sqlserver.SqlServerSnapshotChangeEventSource)
connect | [2021-09-29 12:19:47,149] INFO Snapshot step 1 - Preparing (io.debezium.relational.RelationalSnapshotChangeEventSource)
connect | [2021-09-29 12:19:47,149] INFO Snapshot step 2 - Determining captured tables (io.debezium.relational.RelationalSnapshotChangeEventSource)
connect | [2021-09-29 12:19:47,256] INFO Snapshot step 3 - Locking captured tables [demo.dbo.ORDERS] (io.debezium.relational.RelationalSnapshotChangeEventSource)
connect | [2021-09-29 12:19:47,256] INFO Setting locking timeout to 10 s (io.debezium.connector.sqlserver.SqlServerSnapshotChangeEventSource)
connect | [2021-09-29 12:19:4
@thierryturpin
thierryturpin / mssql-dbo-orders.json
Created October 7, 2021 14:46
MSSQL source connector
{
"name": "mssql-dbo-orders",
"config": {
"connector.class": "io.debezium.connector.sqlserver.SqlServerConnector",
"database.hostname": "172.31.59.71",
"database.port": "1433",
"database.user": "sa",
"database.password": "",
"database.dbname": "demo",
"database.server.name": "dev",
❯ bw unlock
? Master password: [hidden]
Your vault is now unlocked!
To unlock your vault, set your session key to the `BW_SESSION` environment variable. ex:
$ export BW_SESSION="____#bitwarden_generated_session_key#____"
> $env:BW_SESSION="____#bitwarden_generated_session_key#____"
You can also pass the session key to any command with the `--session` option. ex:
$ bw list items --session ____#bitwarden_generated_session_key#____
#!/bin/bash
##################################################
# Bash script to source credentials from bitwarden
##################################################
pflag=false
while getopts "p:" opt; do
case $opt in
@thierryturpin
thierryturpin / credentials
Created April 21, 2021 18:28
.aws/credentials
[turpin]
credential_process = /Users/thierryturpin/Documents/SYSTEM/awscreds/awscreds -p turpin
[micropole]
credential_process = /Users/thierryturpin/Documents/SYSTEM/awscreds/awscreds -p micropole
ecs-cli compose up eu-west-1 --cluster airflow-dev --launch-type EC2
ecs-cli up --instance-role ecsInstanceRole \
--extra-user-data cloud-config \
--keypair thierryturpin \
--size 1 \
--port 8080 \
--subnets subnet-c167d1a4 \
--vpc vpc-975494f2 \
--instance-type t3.large \
--cluster airflow-dev \
--region eu-west-1 \