Skip to content

Instantly share code, notes, and snippets.

View kjaymiller's full-sized avatar
🤔

Jay Miller kjaymiller

🤔
View GitHub Profile
@kjaymiller
kjaymiller / lint.yml
Last active December 21, 2023 19:08
Ruff and MarkdownLint GH Action
name: Format and Lint with Ruff and MarkdownLint
on:
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
build:
<h1>/Users/kjaymiller/cookiecutters-relecloud/bmfbtfhwbqcbsrsmybaf_fastapi_cosmos_mongodb_aca/.gitignore</h1><hr />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=utf-8" />
@kjaymiller
kjaymiller / ivory-arc-boost.js
Created September 11, 2023 14:04
Arc Boost to Open in Ivory
```js
const baseUrl=document.URL;
try {
const user=baseUrl.split("https://mastodon.social/@")[1];
const ivoryUrl=`ivory://acct/user_profile/${user}`;
console.log(`Opening ${ivoryUrl}`);
window.open(ivoryUrl);
window.close();
}
@kjaymiller
kjaymiller / proposal.md
Last active May 10, 2023 01:57
DjangoCon Talk Proposal

Video Game-ifying Your Learning Process

Abstract:

Developers of all skill levels spend their a good portion of time learning new techniques and modules and applying what they've learned. Many developers look to gaming as a break away from the code, but there is much that can be learned with your hands on the controller.

This talk will explore common video game archetypes, their techniques, and situations in Python development where those techniques can be used to further your personal development.

Description

@kjaymiller
kjaymiller / CODE_OF_CONDUCT.md
Created April 24, 2023 06:12
Black Python Devs Code of Conduct

Citizen Code of Conduct

1. Purpose

A primary goal of Black Python Developers is to be inclusive to the largest number of members identifying as Black. As such, we are committed to providing a friendly, safe and welcoming environment for all, regardless of gender, sexual orientation, ability, ethnicity, socioeconomic status, and religion (or lack thereof).

This code of conduct outlines our expectations for all those who participate in our community, as well as the consequences for unacceptable behavior.

We invite all those who participate in Black Python Developers to help us create safe and positive experiences for everyone.

@kjaymiller
kjaymiller / convert_dates.py
Created April 16, 2023 21:00
Script to convert all date-like frontmatter attributes to iso8601
# Create a script that iterates through the content folder and looks
# install dateutil, frontmatter
# `pip install python-dateutil frontmatter`
# Run with `python convert_dates.py <CONTENT_DIRECTORY>`
from sys import argv
from dateutil.parser import parse
import frontmatter
import pathlib
@kjaymiller
kjaymiller / Add PyTest GH Action.md
Last active March 28, 2023 19:00
Snippet for PyTest GH Actions

This is the snippet and action that will get you quickly setup with pytest for your GitHub Actions.

The snippet can be added to VS Code Snippets for rapid adding to a new project.

@kjaymiller
kjaymiller / README.md
Created February 15, 2023 18:27 — forked from crazy4pi314/README.md
OpenAI assisted git commit msg

How to use:

  1. Make sure you have your OpenAI API key set as an environment variable (OPENAI_API_KEY)
  2. Set up the pre-commit message prep hook bu adding the other two files here in the ./git/hooksdirectory.

Test using it by staging some changes to commit and then running git commit in the command line. The file it pops up for you to edit now should have the suggested summary of the changes from the OpenAI api commented out like this:

# Here is a suggested commit message from code-davinci-002.
# ---
@kjaymiller
kjaymiller / dailiylog.py
Last active December 24, 2022 02:48
Create Daily Log
import sys
import pathlib
from datetime import datetime
today = datetime.today().strftime("%Y-%m-%d")
# Change the path to your notes folder
today_path = pathlib.Path(f"/PATH/TO/YOUR/NOTES/FOLDER/{today}.md")
if not today_path.exists():