Skip to content

Instantly share code, notes, and snippets.

View kenney's full-sized avatar

Andrew Kenney kenney

View GitHub Profile
@kenney
kenney / cursor_history.py
Created April 28, 2025 15:13
Cursor Composer History
import sqlite3
import argparse
import os
import json
import datetime
from collections import namedtuple
"""
Instructions:
- Find your cursor/vscode sqlite DB: `mdfind vscdb | grep -i cursor`

Keybase proof

I hereby claim:

  • I am kenney on github.
  • I am kenney (https://keybase.io/kenney) on keybase.
  • I have a public key ASCMsTmSsLNxxiv4VZO-D0x-JmNL983aHgrgff4Z65c5Fwo

To claim this, I am signing this object:

<html>
<body>
Redirecting...
<script>
var urlParams = new URLSearchParams(window.location.search);
sleep = Math.random(10)*10000
console.log('Waiting ' + sleep + ' milliseconds')
@kenney
kenney / gist:b2fabe97c6bce96c61898c97a283c1fb
Created January 3, 2018 19:40
Barcode service in NodeJS
// Simple HTTP server that renders barcode images using bwip-js.
// https://github.com/metafloor/bwip-js
const http = require('http');
const bwipjs = require('bwip-js');
console.log("Starting up")
http.createServer(function(req, res) {
console.log("Creating server")
// If the url does not begin /?bcid= then 404. Otherwise, we end up
@kenney
kenney / get_incidents_csv.py
Created June 10, 2017 00:12
PagerDuty fetch incidents to CSV
import requests
import sys
import json
import csv
import datetime
from datetime import date
from datetime import timedelta
url = 'https://api.pagerduty.com/incidents'
yesterday = date.today() - timedelta(days=1)