Skip to content

Instantly share code, notes, and snippets.

View asdfgeoff's full-sized avatar

Geoff Ruddock asdfgeoff

View GitHub Profile
GitMurf /
Last active April 27, 2024 07:28
CSS for inline block references that works for both NEW CM6 Live Preview and also Preview Mode for both CM5 (Legacy) and CM6 (New)
:root {
/* #7159de (similar to Obsidian purple) */
--block-ref-line-color: grey;
--block-ref-line-type: solid;
--block-ref-line-size: 2px;
/* Set to "inherit" for no bg color */
--block-ref-hover-bg-color: #d4d0d026;
bobbydennett / redshift_performance_tuning.sql
Created July 9, 2016 00:22
Redshift performance tuning-related queries
-- Incorrect column encoding
SELECT database, schema || '.' || "table" AS "table", encoded, size
FROM svv_table_info
WHERE encoded='N'
SELECT trim(n.nspname || '.' || c.relname) AS "table",trim(a.attname) AS "column",format_type(a.atttypid, a.atttypmod) AS "type",
deanishe /
Last active December 20, 2022 14:05
Rename Alfred workflow folders after their Bundle IDs
# encoding: utf-8
# rename_workflow
# Copyright (c) 2015 Dean Jackson <>
# MIT Licence. See
# Created on 2015-08-02
jbwhit /
Last active September 21, 2023 04:50
Saves Jupyter Notebooks as .py and .html files automatically. Add to the file of your associated profile.
import os
from subprocess import check_call
def post_save(model, os_path, contents_manager):
"""post-save hook for converting notebooks to .py and .html files."""
if model['type'] != 'notebook':
return # only do this for notebooks
d, fname = os.path.split(os_path)
check_call(['jupyter', 'nbconvert', '--to', 'script', fname], cwd=d)
check_call(['jupyter', 'nbconvert', '--to', 'html', fname], cwd=d)