Skip to content

Instantly share code, notes, and snippets.

View asdfgeoff's full-sized avatar

Geoff Ruddock asdfgeoff

View GitHub Profile
@MarcStocker
MarcStocker / HASynologyStatusCard.yaml
Created November 3, 2024 04:59
HA Card - Synology Status - Single Large Card
type: custom:vertical-stack-in-card
cards:
- type: horizontal-stack
cards:
- type: picture
image: >-
https://external-content.duckduckgo.com/iu/?u=http%3A%2F%2Fwahlnetwork.com%2Fwp-content%2Fuploads%2F2014%2F01%2Fsynology-logo.jpg&f=1&nofb=1&ipt=d09f2dcc4abfa12fa8c46867b218661c682936cc4071ee907c1f4bd9f91a01fa&ipo=images
card_mod:
style: |
ha-card {
@lordpixel23
lordpixel23 / Readme.md
Last active February 13, 2025 23:51
Adding support for Apple fn/Globe key to QMK

What this does

This allows you to define a key for your QMK keyboard which has some of the same functionality as the fn/Globe key on an Apple keyboard. Applying the following patch to your qmk repository creates a new keycode KC_GLOBE which can then be used in your keymaps.

Where is this from

This commit is updating @drashna's code from Nov 2023 to work with the Nov 2024 files.

How to

@GitMurf
GitMurf / obsidian.live-preview.css.block-ref-inline.css
Last active July 14, 2024 16:47
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
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'
ORDER BY 2;
SELECT trim(n.nspname || '.' || c.relname) AS "table",trim(a.attname) AS "column",format_type(a.atttypid, a.atttypmod) AS "type",
@deanishe
deanishe / rename_workflow.py
Last active December 20, 2022 14:05
Rename Alfred workflow folders after their Bundle IDs
#!/usr/bin/python
# encoding: utf-8
#
# rename_workflow
#
# Copyright (c) 2015 Dean Jackson <deanishe@deanishe.net>
#
# MIT Licence. See http://opensource.org/licenses/MIT
#
# Created on 2015-08-02
@jbwhit
jbwhit / post-save-hook.py
Last active September 21, 2023 04:50
Saves Jupyter Notebooks as .py and .html files automatically. Add to the ipython_notebook_config.py 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)