Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am matt-snider on github.
  • I am mattsnider (https://keybase.io/mattsnider) on keybase.
  • I have a public key ASBYlDlF9O3ClQ4vWN3xPbsIS87bGMmdGszj-w2-sSHBqgo

To claim this, I am signing this object:

-- Actions ---
$Copy <C-C> <C-Ins>
$Cut <C-X> <S-Del>
$Delete <Del>
$LRU
$Paste <C-V> <S-Ins>
$Redo <C-S-Z> <A-S-BS>
$SearchWeb
$SelectAll <C-A>
$Undo <C-Z> <A-BS>
@matt-snider
matt-snider / g-chord.svg
Last active April 22, 2017 13:16
vue-guitar-chords
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/bin/sh
# i3-get-window-criteria - Get criteria for use with i3 config commands
# To use, run this script, then click on a window.
# Output is in the format: [<name>=<value> <name>=<value> ...]
# Known problem: when WM_NAME is used as fallback for the 'title="<string>"' criterion,
# quotes in "<string>" are not escaped properly. This is a problem with the output of `xprop`,
# reported upstream: https://bugs.freedesktop.org/show_bug.cgi?id=66807
#!/bin/bash
# git-branch-diff
#
# Shows the difference in commits between two branches. If only
# one branch is given, the other defaults to HEAD.
#
# msnider$
if [[ $# -eq 1 ]] ; then
git log --oneline HEAD..$1
from concurrent.futures import ThreadPoolExecutor
from itertools import chain
from peewee import Model
executor = ThreadPoolExecutor(max_workers=5)
def _query_on_executor_meta(name, bases, attrs, executor):
"""A metaclass that adds async database methods to a `peewee.Model`.
# The following will check for a .venv file, and if it exists,
# automagically switch to working on that virtualenv.
#
# https://justin.abrah.ms/python/virtualenv_wrapper_helper.html
source /usr/bin/virtualenvwrapper.sh
function prompt()
{
if [ "$PWD" != "$MYOLDPWD" ]; then
MYOLDPWD="$PWD"
@matt-snider
matt-snider / README.md
Last active April 6, 2022 21:54
Daily XKCD Dashing Widget

Preview

Description

A Dashing widget that shows the current xkcd comic.

The widget will display the current comic if it was published today, and otherwise it will find a random one. This ensures there is a new comic shown every day.

Dependencies

The only dependency is json.

@matt-snider
matt-snider / git-last
Last active August 29, 2015 14:27
Show the last n git commits in single-line format
#!/bin/bash
# git-last
#
# Shows the last n commits in one line format.
#
# msnider$ git last 2
# msnider$ 5c95c39 Refactor foo()
# msnider$ 9875103 Bump version to 1.3
re='^[0-9]+$'
@matt-snider
matt-snider / README.md
Last active January 17, 2019 20:02 — forked from christiangalsterer/README.md
JIRA List Current Sprint Issues Dashing Widget

Preview

Description

A Dashing widget that lists JIRA issues in the current sprint for a specific team. For example open issues, in progress issues, etc.

Dependencies

Requires the following: