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
//await connection.OpenWithRetryAsync(retryPolicy).ConfigureAwait(false); | |
//var reader = await command.ExecuteReaderWithRetryAsync(retryPolicy).ConfigureAwait(false); | |
public static Task OpenWithRetryAsync(this SqlConnection connection, | |
RetryPolicy retryPolicy) | |
{ | |
return retryPolicy.ExecuteAsync(connection.OpenAsync); | |
} | |
A quick note on how I'm currently handling Blue/Green or A/B deployments with Terraform and AWS EC2 Auto Scaling.
In my particular use case, I want to be able to inspect an AMI deployment manually before disabling the previous deployment.
Hopefully someone finds this useful, and if you have and feedback please leave a comment or email me.
I build my AMI's using Packer and Ansible.
init.vim and settings.vim go under ~/.config/nvim Follow the installation instructions for https://github.com/junegunn/vim-plug and place plug.vim in ~/.config/nvim/autoload
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
""" | |
Usage example: | |
from logger import get_logger | |
log = get_logger() | |
log.info('my_event', my_key1='val 1', my_key2=5, my_key3=[1, 2, 3], my_key4={'a': 1, 'b': 2}) | |
List of metadata keys in each log message: | |
event | |
_func |
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 required packages | |
from dotenv import load_dotenv # For managing environment variables | |
from html2text import html2text # For HTML to markdown conversion | |
from readability import Document # For summarizing HTML content | |
from typing import List # For type hinting | |
import json # For JSON parsing | |
import logging # For logging errors | |
import openai # OpenAI GPT API | |
import os # For OS-level operations | |
import requests # For HTTP requests |
OlderNewer