Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@guyzmo
guyzmo / manual.head.xml
Last active February 11, 2017 16:38
xml crap
<?xml version="1.0" standalone="no"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<book>
<bookinfo>
<title>The Mutt E-Mail Client</title>
<author>
<firstname>Michael</firstname><surname>Elkins</surname>
<email>me@cs.hmc.edu</email>
@guyzmo
guyzmo / identity_sort_of_menu
Created February 10, 2017 15:38
multiple identities sort-of-menu
alias identity_1 Me <me@one>
alias identity_2 Myself <myself@two>
alias identity_3 I <I@three>
macro compose v "<edit-from>^Uidentity_<tab>" "Select from"
@guyzmo
guyzmo / regex_warnings
Created February 9, 2017 13:45
neomutt: regex.c warnings
../regex.c: In function ‘re_compile_fastmap’:
../regex.c:1183:26: warning: assignment from incompatible pointer type [-Wincompatible-poi
nter-types]
: ((fail_stack).stack = \
^
../regex.c:1199:9: note: in expansion of macro ‘DOUBLE_FAIL_STACK’
&& !DOUBLE_FAIL_STACK (FAIL_STACK)) \
^~~~~~~~~~~~~~~~~
../regex.c:3341:20: note: in expansion of macro ‘PUSH_PATTERN_OP’
if (!PUSH_PATTERN_OP (p + j, fail_stack))
@guyzmo
guyzmo / mouse_buttons_as_keys.py
Created January 31, 2017 17:36
Mouse key remap for Thinkpad trackpoint
#!/usr/bin/python3.5
# -*- coding: utf-8 -*-
"""
Sort of mini driver.
Read a specific InputDevice (my_mx_mouse),
monitoring for special thumb button
Use uinput (virtual driver) to create a mini keyboard
"""
@guyzmo
guyzmo / .XCompose
Created January 24, 2017 21:40
[WIP] My XCompose file
include "/usr/share/X11/locale/en_US.UTF-8/Compose"
<Multi_key> <asterisk> <A> : "Α" U0391 # GREEK CAPITAL LETTER ALPHA
<Multi_key> <asterisk> <B> : "Β" U0392 # GREEK CAPITAL LETTER BETA
<Multi_key> <asterisk> <G> : "Γ" U0393 # GREEK CAPITAL LETTER GAMMA
<Multi_key> <asterisk> <D> : "Δ" U0394 # GREEK CAPITAL LETTER DELTA
<Multi_key> <asterisk> <E> : "Ε" U0395 # GREEK CAPITAL LETTER EPSILON
<Multi_key> <asterisk> <Z> : "Ζ" U0396 # GREEK CAPITAL LETTER ZETA
<Multi_key> <asterisk> <Y> : "Η" U0397 # GREEK CAPITAL LETTER ETA
<Multi_key> <asterisk> <H> : "Θ" U0398 # GREEK CAPITAL LETTER THETA
@guyzmo
guyzmo / muttrc
Last active February 20, 2023 20:00
Testing the LUA get()/set() API
set visual=vim
set connect_timeout=69
set arrow_cursor
set mask="!^\\.[^.]"
lua-source ./muttrc-type-test.lua
lua test_config_type("DT_STR ", "visual", "vim", "fubar")
lua test_config_type("DT_NUM ", "connect_timeout",69,42)
lua test_config_type("DT_BOOL ", "arrow_cursor", true, false)
lua test_config_type("DT_QUAD ", "abort_noattach", mutt.QUAD_NO, mutt.QUAD_ASKNO)
@guyzmo
guyzmo / plot_gcode.py
Created December 17, 2016 15:55
Gcode Plotter
#!/usr/bin/env python
from __future__ import unicode_literals, print_function
import sys
import matplotlib.pyplot as plt
import csv
import re
@guyzmo
guyzmo / private.xml
Created September 21, 2016 01:16
Karabiner configuration for disabling the command keys
<?xml version="1.0"?>
<root>
<item>
<name>Send Shift-Ctrl-F13 for Command Left</name>
<identifier>private.send_shift_ctrl_f13_for_lcmd</identifier>
<autogen>--KeyToKey-- KeyCode::COMMAND_L,
KeyCode::F13, ModifierFlag::SHIFT_L
| ModifierFlag::CONTROL_L
</autogen>
</item>
@guyzmo
guyzmo / crash_snippet.log
Created September 18, 2016 16:26
Meteor crash report
W20160918-18:20:16.911(2)? (STDERR) /home/guyzmo/Workspace/Freelance/wd2/node_modules/q/q.js:155
W20160918-18:20:16.912(2)? (STDERR) throw e;
W20160918-18:20:16.913(2)? (STDERR) ^
W20160918-18:20:16.913(2)? (STDERR)
W20160918-18:20:16.914(2)? (STDERR) Error: socket hang up
W20160918-18:20:16.915(2)? (STDERR) at createHangUpError (_http_client.js:213:15)
W20160918-18:20:16.916(2)? (STDERR) at Socket.socketCloseListener (_http_client.js:245:23)
W20160918-18:20:16.917(2)? (STDERR) at emitOne (events.js:82:20)
W20160918-18:20:16.917(2)? (STDERR) at Socket.emit (events.js:169:7)
W20160918-18:20:16.918(2)? (STDERR) at TCP._onclose (net.js:486:12)
Test session starts (platform: linux, Python 3.5.1, pytest 2.9.2, pytest-sugar 0.7.1)
rootdir: …, inifile:
plugins: cov-2.2.1, xdist-1.14, sugar-0.7.1, catchlog-1.2.2, datadir-ng-1.1.0
―――――――――――――――――――――――――――――――――――――――――――――――― ERROR at teardown of TestCalenvite.test_subscribe__merge_calendar ――――――――――――――――――――――――――――――――――――――――――――――――
self = <CallInfo when='teardown' exception: teardown_method() takes 1 positional argument but 2 were given>
func = <function call_runtest_hook.<locals>.<lambda> at 0x7fda4e291268>, when = 'teardown'