Skip to content

Instantly share code, notes, and snippets.

Avatar
😐

Matt Keranen kmatt

😐
  • Central FL US
View GitHub Profile
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
kmatt / .zshrc
Created Feb 18, 2022 — forked from aiqc/.zshrc
zsh_prompt.txt
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
setopt PROMPT_SUBST
@kmatt
kmatt / void-wsl.sh
Last active Aug 25, 2022
Install Void Linux on WSL2
View void-wsl.sh
# Based on https://gist.github.com/kmatt/71603170556ef8ffd14984af77ff10c5
# prompt ">" indicates Powershell commands
# https://docs.microsoft.com/en-us/windows/wsl/install-win10
> dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
> dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
# install https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi
View gist:e6e077783346bfbade0f21830417dc86
#### Issue description
#### Steps to reproduce the issue
1.
2.
3.
View wombat.vim
" Maintainer: Lars Nielsen (dengmao@gmail.com)
" Last Change: January 22 2007
" https://dengmao.wordpress.com/2007/01/22/vim-color-scheme-wombat/
set background=dark
hi clear
if exists("syntax_on")
syntax reset
@kmatt
kmatt / fedora-wsl.sh
Last active Apr 27, 2021
Fedora on WSL2
View fedora-wsl.sh
# From https://fedoramagazine.org/wsl-fedora-33/
# prompt ">" indicates Powershell commands
# https://docs.microsoft.com/en-us/windows/wsl/install-win10
> dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
> dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
# install https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi
View LearnGoIn5mins.md
@kmatt
kmatt / Clickhouse-ranking.sql
Last active Feb 10, 2021 — forked from alexey-milovidov/rank.txt
Example of emulation of rank function with arrayEnumerateUniq.
View Clickhouse-ranking.sql
/*
ClickHouse client version 1.1.53996.
Connecting to localhost:9000.
Connected to ClickHouse server version 1.1.53996.
*/
:) CREATE TABLE IF NOT EXISTS `employee` (
:-] `empid` Int32,
:-] `deptid` Int32,
:-] `salary` Int64
@kmatt
kmatt / vd.py
Created Nov 9, 2020
Visidata as a terminal Pandas dataframe viewer
View vd.py
import pandas as pd
import visidata as vd
df=pd.read_csv('file.csv')
vd.view_pandas(df)
@kmatt
kmatt / slugify.postgres.sql
Last active Jul 6, 2022 — forked from abn/slugify.postgres.sql
A slugify function for postgres
View slugify.postgres.sql
-- original source: https://medium.com/adhawk-engineering/using-postgresql-to-generate-slugs-5ec9dd759e88
-- https://www.postgresql.org/docs/9.6/unaccent.html
CREATE EXTENSION IF NOT EXISTS unaccent;
CREATE OR REPLACE FUNCTION public.slugify(v TEXT) RETURNS TEXT
LANGUAGE plpgsql
STRICT IMMUTABLE AS
$function$
BEGIN