Skip to content

Instantly share code, notes, and snippets.

View ryankanno's full-sized avatar
🇺🇸
Coding

Ryan Kanno ryankanno

🇺🇸
Coding
View GitHub Profile
//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);
}
@ryan0x44
ryan0x44 / Terraform-Blue-Green-AWS.md
Created November 19, 2015 21:57
Blue-Green AWS Auto Scaling Deployments with Terraform

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.

Overview

I build my AMI's using Packer and Ansible.

@ryansch
ryansch / README.md
Created July 23, 2016 22:24
neovim + yadr
@impredicative
impredicative / logger.py
Last active March 11, 2023 10:59
Python json logging using structlog and stdlib logging
"""
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
@veekaybee
veekaybee / normcore-llm.md
Last active July 14, 2025 23:52
Normcore LLM Reads

Anti-hype LLM reading list

Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.

Foundational Concepts

Screenshot 2023-12-18 at 10 40 27 PM

Pre-Transformer Models

@harperreed
harperreed / chain_summarization.py
Created September 16, 2023 03:16
Chain of Density Summarization
# 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