Skip to content

Instantly share code, notes, and snippets.


Matt Keranen kmatt

  • Central FL US
View GitHub Profile
kmatt /
Created Jan 18, 2023 — forked from ssrihari/
An opinionated list of excellent Clojure learning materials

An opinionated list of excellent Clojure learning materials

These resources (articles, books, and videos) are useful when you're starting to learn the language, or when you're learning a specific part of the language. This an opinionated list, no doubt. I've compiled this list from writing and teaching Clojure over the last 10 years.

  • 🔴 Mandatory (for both beginners and intermediates)
  • 🟩 For beginners
  • 🟨 For intermediates

Table of contents

  1. Getting into the language
kmatt /
Created Jan 17, 2023 — forked from gordthompson/
Alternative to_sql() *method* for mssql+pyodbc
# Alternative to_sql() *method* for mssql+pyodbc or mssql+pymssql
# adapted from
import json
import pandas as pd
import sqlalchemy as sa
def mssql_insert_json(table, conn, keys, data_iter):
kmatt /
Created Jan 12, 2023 — forked from gordthompson/
Build a T-SQL MERGE statement and upsert a DataFrame
# version 1.2 - 2022-11-01
import pandas as pd
import sqlalchemy as sa
def df_upsert(data_frame, table_name, engine, schema=None, match_columns=None):
Perform an "upsert" on a SQL Server table from a DataFrame.
Constructs a T-SQL MERGE statement, uploads the DataFrame to a
kmatt /
Created Jan 8, 2023
Cross compile to Windows using Zig
# On Linux or macOS
export CC="zig cc -target x86_64-windows-gnu
./configure --host x86_64-windows-gnu
kmatt / .vimrc
Last active Jan 4, 2023
View .vimrc
" curl -fLo ~/.vim/autoload/plug.vim --create-dirs
let g:pymode_python = 'python3'
let g:python3_host_prog = expand('/usr/bin/python3')
call plug#begin()
Plug 'chrisbra/vim-diff-enhanced'
Plug 'cweagans/vim-taskpaper'
Plug 'dsolstad/vim-wombat256i'
kmatt / MacOSLogoutHook.txt
Last active Nov 23, 2022 — forked from RxDx/MacOSLogoutHook.txt
MacOS: Run script before shutdown
View MacOSLogoutHook.txt
Create a file:
$ vim /Users/Shared/
File content:
say 'Hasta la vista baby!'
Set execution permission:
$ sudo chmod +x /Users/Shared/
View gist:6ef2450eba640d477e253cc2242d57ea
# brew install unixodbc
export CPPFLAGS="-I/opt/homebrew/Cellar/unixodbc/2.3.9_1/include"
export LDFLAGS="-L/opt/homebrew/Cellar/unixodbc/2.3.9_1/lib -liodbc -liodbcinst"
export PKG_CONFIG_PATH="/opt/homebrew/Cellar/unixodbc/2.3.9_1/lib/pkgconfig $PKG_CONFIG_PATH"
pip install --no-binary pyodbc pyodbc
kmatt / .zshrc
Created Feb 18, 2022 — forked from aiqc/.zshrc
View .zshrc
# ========= PROMPT =========
# Version control information
autoload -Uz vcs_info
precmd() { vcs_info }
# Format the vcs_info_msg_0_ variable
zstyle ':vcs_info:git:*' formats ' %b '
# Render the prompt
kmatt /
Last active Jan 2, 2023
Install Void Linux on WSL2
# Based on
# prompt ">" indicates Powershell commands
> dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
> dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
# install
View gist:e6e077783346bfbade0f21830417dc86
#### Issue description
#### Steps to reproduce the issue