Skip to content

Instantly share code, notes, and snippets.

View mattparmett's full-sized avatar

Matt Parmett mattparmett

View GitHub Profile
@jcconnell
jcconnell / init.lua
Last active June 11, 2023 23:52
Hammerspoon Spoon to replace clipboard contents with ChatGPT
--- === ChatGPT ===
---
--- Replace clipboard contents with ChatGPT
---
--- Place this file in the ~/.hammerspoon directory with the following structure
--- ── Spoons
---   └── ChatGPT.spoon
---   └── init.lua
---
--- To use, add the following lines to ~/.hammerspooon/init.lua. Replace with your preferred hot key.
/**
* @name Unhandled CustomError
* @description A CustomError is returned from this function but it is not handled by the calling code.
* @kind path-problem
* @problem.severity warning
* @precision medium
* @tags security
* @id tob/global-unhandled-custom-error
*/
import cpp
@syncom
syncom / mutt-with-gmail-gpg-macosx.md
Last active December 15, 2023 23:11
Configure Mutt to work with Gmail + GPG on Mac OS X

Mutt (or NeoMutt) with Gmail and GPG, Mutiple Accounts

This note describes how to set up the Mutt or NeoMutt email client to work for Gmail and GnuPG, for two Gmail accounts. The method can be trivially extended to more than two accounts. The configuration should work for both macOS and Linux.

Software versions

@al45tair
al45tair / gist:73be245ab87a66a885742b98be91ac14
Last active April 10, 2024 09:00
Files installed by Zoom for mac OS

The Zoom install package for macOS is mad. Rather than actually using the installer to install things, it does everything in the preinstall script. That's bonkers, and also means that the system won't have a list of the files it installed, because it's doing it using shell script.

The script appears to install two items, namely:

/Applications/zoom.us.app
~/Library/Internet Plug-Ins/ZoomUsPlugIn.plugin

If the user opening the package isn't an administrator, it looks like it will install the app in the user's home folder instead. If they are an administrator, Zoom will delete the ZoomUsPlugIn.plugin from /Library if it's there, but it still installs to ~/Library.

It also adds Zoom to your Dock automatically, without asking.

@nomand
nomand / AppleWKRemapper.ahk
Last active December 2, 2021 02:05 — forked from TheZoc/AppleWKRemapper.ahk
AutoHotKey script that allows Apple wireless keyboard work in Windows 10 with some layout changes. See header for details and credits to original authors and modders.
;===========================================================================================================================================
; Additional Modifications by nomand
;==========================================================================================================================================
;
; - fixed Media_Next functinality
; - moved Eject key screenshots to active window screenshot shortcut (Ctrl+F3)
; - restored Lctrl <> Fn swap
; - restored page up/down, home/end functinality
; - F12 Insert remap kept disabled
; - cleaned up code indentations and comments
@agoldst
agoldst / contacts_query.sh
Last active November 28, 2023 01:15
Query macOS contacts for mutt
#!/bin/bash
#
# contacts_query.sh
# Andrew Goldstone, July 2017. All yours to use or modify, but no promises.
#
# The mutt e-mail client has an option to query an external address book for
# e-mail addresses. On a Mac it is nice to be able to query the Address Book
# (now known as Contacts). For a while I used a utility called contacts
# (http://gnufoo.org/contacts) but this stopped working under Sierra. There is
# an official API for querying Contacts as a unified datastore, but it is only
@mneedham
mneedham / app.py
Last active February 9, 2024 18:26
Mapping Strava runs using Leaflet and Open Street Map
from flask import Flask
from flask import render_template
import csv
import json
app = Flask(__name__)
@app.route('/')
def my_runs():
runs = []
@heptal
heptal / amphetamine.md
Last active April 22, 2024 15:12
Hammerspoon replacement for Caffeine

Amphetamine

Simple toggleable menubar replacement for Caffeine in Hammerspoon, utilizing ASCIImage (for vector) to create the amphetamine icons. Motivated by the official Caffeine app's icon looking bad on Retina

Get latest version here: amphetamine.lua

Save as amphetamine.lua in ~/.hammerspoon/ and put amphetamine = require "amphetamine" in your init.lua

@bitemyapp
bitemyapp / gist:8739525
Last active May 7, 2021 23:22
Learning Haskell
@BashedCrab
BashedCrab / HydrogenLayouts.py
Last active March 19, 2023 04:14
HydrogenLayouts
#
# Hydrogen is a lightweight GUI framework for Pythonista
#
# Hydrogen - https://gist.github.com/BashedCrab/5924965
#
# HydrogenLayouts - https://gist.github.com/BashedCrab/6103019
#
# HydrogenDemo - https://gist.github.com/BashedCrab/5953776
#