Skip to content

Instantly share code, notes, and snippets.

@patrickwelker
patrickwelker / md-toc.sh
Created August 30, 2019 14:19 — forked from meleu/md-toc.sh
bash script to create a Table of Contents from a Markdown file
#!/bin/bash
# md-toc.sh
############
# Generates a Table of Contents getting a markdown file as input.
#
# Inspiration for this script:
# https://medium.com/@acrodriguez/one-liner-to-generate-a-markdown-toc-f5292112fd14
#
# The list of invalid chars is probably incomplete, but is good enough for my
# current needs.
@patrickwelker
patrickwelker / ddns_provider.conf
Created August 20, 2019 16:13 — forked from superbob/ddns_provider.conf
Namecheap Synology DSM DDNS provider
#Insert this at the end of /etc.defaults/ddns_provider.conf
[Namecheap]
modulepath=/usr/syno/bin/ddns/namecheap.php
queryurl=https://dynamicdns.park-your-domain.com/update
@patrickwelker
patrickwelker / BibDeskQuery Debug Log.txt
Last active August 15, 2018 09:18
The BIB_DIR seems to have been replaced in newer Versions of BibDesk. The Closest match is, but simply replacing the dir with this file won't cut the chase: `$HOME/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/edu.ucsd.cs.mmccrack.bibdesk.sfl2`
Starting debug for 'BibDeskQuery'
[2018-08-15 11:08:36][ERROR: input.scriptfilter] Code 1: 11:08:36 workflow.py:2249 DEBUG ---------- BibDeskQuery ----------
11:08:36 workflow.py:2266 ERROR [Errno 2] No such file or directory: '/Users/ooo/Library/Caches/Metadata/edu.ucsd.cs.mmccrack.bibdesk/'
Traceback (most recent call last):
File "/Users/ooo/Dropbox/Share/Applications/Alfred.alfredpreferences/workflows/user.workflow.0938D69A-FE79-4449-8D32-1A51FDDFD0AE/workflow/workflow.py", line 2259, in run
func(self)
File "bibquery.py", line 532, in main
filter(queries, scope, wf)
File "bibquery.py", line 510, in filter
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.10)
// ----
/*
A slightly more automated approach to BEM modifier classes:
using '&' parent selector interpolation, modifiers extend their bases,
so that HTML markup requires only the modifier class not the base *and* modifier
*/
@patrickwelker
patrickwelker / devonly_tag.rb
Last active April 27, 2018 13:02 — forked from moshen/devonly_tag.rb
Jekyll Dev Only Tag
#
# Jekyll Dev Only Tag
#
# Author : Colin Kennedy
# Usage :
#
# The markup/script/css included within the `devonly` tags
# is included in the rendered page when either:
#
# * `server` mode is used
@patrickwelker
patrickwelker / evoluent-vertical-mouse.xml
Last active February 26, 2018 14:27
Karabiner Setup for Evoluent Vertical Mouse (= so good. Stay away from High Sierra as long as you can.) Can be included in your `private.xml` via `<include path="{{ ENV_HOME }}/Scripts/Karabiner/evoluent-vertical-mouse.xml" />`.
<?xml version="1.0"?>
<root>
<item>
<name>Evoluent VerticalMouse</name>
<appendix>All customizations only apply for the Evoluent VerticalMouse.</appendix>
<!--
Hold Key Modifiers
- Button 1: none
- Button 6: ⌘⌥⇧⌃
@patrickwelker
patrickwelker / evoluent-vertical-mouse.json
Created February 26, 2018 10:09
Karabiner Elements Setup for Evoluent Vertical Mouse
{
"title": "AAA Demo – Tap, Hold & Secondary Function",
"rules": [
{ "description": "Button4 ••• CLICK=> Show Desktop, HOLD=> Mission Control & SECONDARY FUNCTIONS •••••••••••••••••• (HOLD+BUTTON1=> Next Tab, HOLD+BUTTON2=> Previous Tab, HOLD+BUTTON3=> Close Window, HOLD+BUTTON5=> Panic Button)",
"manipulators": [
{
"from": {
"pointing_button": "button4",
"modifiers": {
"optional": [
@patrickwelker
patrickwelker / fb.sh
Last active June 7, 2017 13:17
My default Filebot script skeleton
#!/bin/sh
# Paths
fb_bin="/usr/local/bin/filebot"
fb_log="$HOME/.logs/filebot.log"
fb_exclude="$HOME/.logs/filebot_processed.txt"
fb_library="/PATH-TO-VIDEOS"
fb_source="/PATH-TO-DESTINATION"
plex_ip="IP-HERE"
@patrickwelker
patrickwelker / mwe.c
Last active February 19, 2016 14:36
Minimal working example for qmk_firmware hold+tap dual key modifications
// Demonstrates how to use double keys
// hold q = 1, tap q = q
// hold Q = !, tap Q = Q
//
// hold shift = shift, tap shift = ~
// hold ctrl = ctrl, tap ctrl = !
#include "planck.h"
#include "timer.h" // Have to include timer for timer_read and timer_elapsed
@patrickwelker
patrickwelker / evoluent-verticalmouse.xml
Created October 6, 2015 13:12
Karabiner Template to setup a secondary function key with the Evoluent Vertical Mouse. In this example Button 6 gets assigned the following modifiers: Shift-Right, Control-Right, Option-Right and Command-Right. Import via `<include path="YOUR-PATH-HERE/evoluent-verticalmouse.xml" />`
<?xml version="1.0"?>
<root>
<item>
<name>Evoluent VerticalMouse</name>
<appendix>All customizations only apply for the Evoluent VerticalMouse.</appendix>
<appendix>Note: button 4 (the mouse scroll button) and button 5 are swapped in Karabiner. I still use the default Evoluent labeling.</appendix>
<devicevendordef>
<vendorname>EVOLUENT</vendorname>
<vendorid>0x1a7c</vendorid>
</devicevendordef>