This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun my-flycheck-gawk-fix-message (err) | |
"Remove the repeated file-name/line from the error message of ERR." | |
(setf (flycheck-error-message err) | |
(replace-regexp-in-string | |
"^\\([ \t]*\\)\\(.*\n\\)\\1" | |
"\\2" | |
(replace-regexp-in-string | |
"\ngawk: [^ ]*:" | |
"\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
_xsv() | |
{ | |
cur=${COMP_WORDS[COMP_CWORD]} | |
prev=${COMP_WORDS[COMP_CWORD-1]} | |
cmds=$(xsv --list|awk '/Installed/{next}/./{print $1}') | |
while read -r cmd; do | |
if [[ "${prev}" = "${cmd}" ]]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'bbdb) | |
(defun my-bbdb-notmuch-search (&optional record) | |
"Search for emails to/from RECORD (or current record if interactive)." | |
(interactive) | |
(let* ((record (or record (bbdb-current-record))) | |
(mails (bbdb-record-field record 'mail)) | |
(query (combine-and-quote-strings mails " OR "))) | |
(notmuch-search query))) | |
(define-key bbdb-mode-map (kbd "F") 'my-bbdb-notmuch-search) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# A SpaCy implementation of | |
# https://github.com/Babylonpartners/fastText_multilingual | |
# | |
# heavily based on | |
# https://github.com/Babylonpartners/fastText_multilingual/blob/master/align_your_own.ipynb | |
import numpy as np |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; erc-join.el --- autojoin channels on connect and reconnects | |
;; Copyright (C) 2002-2004, 2006-2016 Free Software Foundation, Inc. | |
;; Author: Alex Schroeder <alex@gnu.org> | |
;; Maintainer: emacs-devel@gnu.org | |
;; Keywords: irc | |
;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcAutoJoin | |
;; This file is part of GNU Emacs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ echo aðc | LANG=C.UTF-8 grep -o '[[:lower:]]' | |
a | |
ð | |
c | |
$ echo aðc | LANG=C.UTF-8 grep -o '[[:upper:]]' | |
$ echo aðc | LANG=C.UTF-8 grep -o '[A-Z]' | |
$ # so far so good | |
$ echo aðc | LANG=nn_NO.UTF-8 grep -o '[[:lower:]]' | |
a | |
ð |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ignore] | |
[include] | |
[libs] | |
[options] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; See http://www.emacswiki.org/emacs/EdiffMode#toc2 | |
(setq ediff-window-setup-function ; I hate having multiple frames | |
'ediff-setup-windows-plain) | |
(setq ediff-split-window-function (lambda (&optional arg) | |
(if (> (frame-width) 156) | |
(split-window-horizontally arg) | |
(split-window-vertically arg)))) | |
(defun ediff--regions-samebuffer (ediff-regions &optional startup-hooks) | |
(let ((cloned-buffer (clone-indirect-buffer-other-window nil t))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
l20n.js -text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
run () { | |
signal-desktop & | |
disown | |
} | |
show () { | |
local -r id="$1" | |
idx="$(printf "0x%08x" "${id}")" |