Skip to content

Instantly share code, notes, and snippets.

View cdinnison's full-sized avatar
🍊

Clark Dinnison cdinnison

🍊
View GitHub Profile
@cdinnison
cdinnison / .gitconfig
Last active December 20, 2024 06:25
AI-Powered Commit Messages from Unstaged Changes
[alias]
save = "!f() { commit_message=$(bash ~/developer/scripts/git_save.sh); if [ \"$commit_message\" != \"No unstaged changes to commit.\" ] && [ -n \"$commit_message\" ]; then git add . && echo \"$commit_message\" | xargs -I {} git commit -m \"{}\" && git push; else echo \"No commit message generated\"; fi; }; f"
message = !bash ~/developer/scripts/git_save.sh
@cdinnison
cdinnison / .gitconfig
Created September 10, 2024 19:24 — forked from bbar/.gitconfig
[alias]
save = "!f() { commit_message=$(bash ~/dev/scripts/git_save.sh); if [ \"$commit_message\" != \"No unstaged changes to commit.\" ] && [ -n \"$commit_message\" ]; then git add . && echo \"$commit_message\" | xargs -I {} git commit -m \"{}\" && git push; else echo \"No commit message generated\"; fi; }; f"
message = !bash ~/dev/scripts/git_save.sh
#!/usr/bin/env python3
import sys
import os
# Add the pipx OpenAI installation directory to sys.path
openai_path = '/Users/YOUR-PATH-HERE/.local/pipx/venvs/openai/lib/python3.12/site-packages'
sys.path.append(openai_path)
from openai import OpenAI
import subprocess
<svg width="100vw" height="100vh" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 602 450.54"><defs><style>.line{fill:none;stroke:#000;stroke-miterlimit:10;}</style></defs><title>Topographic Map</title><path class="line" d="M535.45 106.46s-5.75-14.25.25-27.5-8.25-21-10.75-23-26.75-10.75-51.25-52.5"/><path class="line" data-name="line" d="M485.45 4.21s15.25 30 44.75 47.25c0 0 17.25 6.75 13.25 25.5s2 23.75 2 23.75"/><path class="line" data-name="line" d="M556.2 114.21s19.5 11.75 15.25 37.25 28.5 58 28.5 58"/><path class="line" data-name="line" d="M494.2 4s14 27.75 38.75 44.25c0 0 13.75 3.75 18.5 33.5a29 29 0 0 0 5 11.75"/><path class="line" data-name="line" d="M566.45 105.21s17 10.5 11.5 31-3 32.75 22.5 60.75"/><path class="line" data-name="line" d="M499.2 4.21s7.75 21.5 37.5 41.25c0 0 10.5 5.25 15.75 22.75a67.14 67.14 0 0 0 11.25 17"/><path class="line" data-name="line" d="M576.95 91.71s16 5.25 5.25 45c0 0-10 28.75 18.5 51"/><path class="line" data-name="line" d="M600.45 172s-33.25-15.5 1-65.5"/><path class="l
@cdinnison
cdinnison / CalRecycle Virgin vs Recycled Plastic Use | 2017.csv
Created September 12, 2018 00:42
This shows the amounts of postconsumer recycled plastic used annually by top brands. Section 14549.3 of the Public Resources Code (PRC) requires reports of the amount of virgin plastic and postconsumer recycled plastic used in beverage containers sold in California.
Beverage Manufacturer Name Recycled Plastic Used
Califia Farms 0
Campbell Sales Company 0
Coca Cola — Soda Products 16%
Coca Cola — Sports Drinks 0%
Country Pure Foods 0
Danone Waters ofAmerica, Inc. 9.60%
Evolution Fresh, Inc 0
FIJI Water Company LLC 0
Harmless Harvest Inc. 0
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Syncano=t()}}(function(){var t,e,r;return function n(t,e,r){function i(s,a){if(!e[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=e[s]={exports:{}};t[s][0].call(l.exports,function(e){var r=t[s][1][e];return i(r?r:e)},l,l.exports,n,t,e,r)}return e[s].exports}for(var o="function"==typeof require&&require,s=0;s<r.length;s++)i(r[s]);return i}({1:[function(e,r,n){(function(e,i){!function(e){if("object"==typeof n&&"undefined"!=typeof r)r.exports=e();else if("function"==typeof t&&t.amd)t([],e);else{var o;"undefined"!=typeof window?o=window:"undefined"!=typeof i?o=i:"undefined"!=typeof self&&(o=self),o.Promise=e()}}(funct
@cdinnison
cdinnison / gist:f01e8c0235d79854414e
Created August 11, 2014 17:51
Low Memory iOS crash report
{"version":"104","bug_type":"198","os_version":"iPhone OS 7.1.1 (11D201)"}
Incident Identifier: 9B95E624-8531-4A61-9843-B06EBCF4B8B2
CrashReporter Key: e635c8bf92ea843f6d93b749236ec7f724e54ec7
Hardware Model: iPhone6,1
OS Version: iPhone OS 7.1.1 (11D201)
Kernel Version: Darwin Kernel Version 14.0.0: Fri Mar 28 21:22:21 PDT 2014; root:xnu-2423.10.70~1/RELEASE_ARM64_S5L8960X
Date: 2014-08-11 10:40:42 -0700
Time since snapshot: 120 ms
Free pages: 2224