Skip to content

Instantly share code, notes, and snippets.

@DDecoene
DDecoene / README.md
Created December 28, 2025 21:46
Auto-commit tool: Watches file saves and generates commit messages using Groq & Llama 3.1

🚀 Groq-Powered Auto-Commit

A Python script that monitors your directory for file saves and automatically creates Git commits with high-quality messages generated by Llama 3.1 (via Groq API).

Features

  • Instant Messages: Uses Groq's high-speed inference.
  • Context Aware: Sends the previous and new version of the file in JSON format to the LLM for accurate messages.
  • Local Only: It runs git add and git commit, but never git push.
  • Ignore Logic: Automatically ignores .env, .git, and virtual environments.
@DDecoene
DDecoene / keybase.md
Created April 10, 2020 00:12
Keybase proof

Keybase proof

I hereby claim:

  • I am ddecoene on github.

  • I am qualeptes (https://keybase.io/qualeptes) on keybase.

  • I have a public key ASDtVLc26wbdAB-XBO9CnyxqbqJWfomaFngd2nJNjAP_fAo

@DDecoene
DDecoene / ThisOutlookSession.cls
Last active June 13, 2019 07:24
Find outlook folders by name. Move folders to other folder
Private m_Folder As MAPIFolder
Private m_Find As String
Private m_Wildcard As Boolean
Private Const SpeedUp As Boolean = True
Private Const StopAtFirstMatch As Boolean = True
Public Sub FindFolder()
Dim sName As String
Dim oFolders As Folders
// ==UserScript==
// @name CookieDemo
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author Dennis Decoene
// @match https://www.lifewire.com/*
// @require https://code.jquery.com/jquery-3.3.1.min.js
// @require https://cdn.jsdelivr.net/npm/js-cookie@2/src/js.cookie.min.js
@DDecoene
DDecoene / main.py
Created October 24, 2017 14:14
Why does the SiPy not wake up when I connect P18 to GND?
'''
With the deepsleep shield and the expansion board attached, send the Pycom into deepsleep
for 20 seconds when the button on the expansion board is pressed.
Make sure we can 'revive' the Pycom when P18 goes low.
This is basically an expanded deepsleep example.
In this version, the 'revival' part does not work.
I made this into a Gist to share the code, looking for answers as to why not
'''
from machine import Pin, Timer
from deepsleep import DeepSleep
@DDecoene
DDecoene / extract.py
Created March 15, 2017 12:22
Extract jpg data from pdf into separate files.
import os
# Extract jpg's from pdf's. Quick and dirty.
def extract_jpg(filename):
startmark = "\xff\xd8"
startfix = 0
endmark = "\xff\xd9"
endfix = 2
i = 0
@DDecoene
DDecoene / split.sh
Created June 17, 2016 11:47
Split MP3 in 3min chunks
#!/bin/bash
#found at: http://www.alecjacobson.com/weblog/?p=4378
big="$1"
duration_stamp=$(ffmpeg -i "$big" 2>&1 | grep Duration | sed 's/^.*Duration: *\([^ ,]*\),.*/\1/g')
title=$(ffmpeg -i "$big" 2>&1 | grep "title *:" | sed 's/^.*title *: *\(.*\)/\1/g')
# get minutes as a raw integer number (rounded up)
prefix=$(basename "$big" .mp3)
echo $duration_stamp
mins=$(echo "$duration_stamp" | sed 's/\([0-9]*\):\([0-9]*\):\([0-9]*\)\.\([0-9]*\)/\1*60+\2+\3\/60+\4\/60\/100/g' | bc -l | python -c "import math; print int(math.ceil(float(raw_input())))")
ss="0"
@DDecoene
DDecoene / main.py
Created June 2, 2016 15:07
Why does this fail?
provider1 = {'id': 1, 'name': 'Een'}
provider2 = {'id': 2, 'name': 'Twee'}
provider3 = {'id': 3, 'name': 'Drie'}
provider4 = {'id': 4, 'name': 'Vier'}
provider5 = {'id': 5, 'name': 'Vijf'}
provider6 = {'id': 6, 'name': 'Zes'}
provider7 = {'id': 7, 'name': 'Zeven'}
providers = [provider1, provider2, provider3, provider4, provider5, provider6, provider7]