AT4I3XSN3KN4K56GP5ZV55NKYDZ7LFV4AHKMB3PHQCXN56SADVTAC
YJRO357HWCFSZXNWU7QUIX5N6Q7LPKDOU42PDEGOMG6SISDP4DZAC
RBDOUAOLSB5TQYK2QYTQ7MUAZQ3Q3VPITHJJPM7C5FVAHCJTDFWQC
HKFGC6XAMYU7UYXEMYAA3D6W6BE6CQYTLIWOAJHJ3T7NMKCQPLEAC
7OOJFR5YEVMWKWPKPNNS2KORW2NNLB6KH74AOZWHLJO6JYJGUIUQC
F4OVQPCPG3QAEZGFDBTBIE2LXNFNI52NQZAFXYH3STO6KIRKOEAQC
RBBBDTNM7J6BR3SUIZQQ3FATAVWTXFQ5472JJGVH3TC37VYGSTFAC
KYBCX6CAMAG25UXT2JJAGZZFFQVUPKZPLOJXJVA7NTVARXJ6BGMAC
VSGSN57DJWUM5XTB76IDCPLWXQ7NWN2I25XROSZIFLF6PT5AVZOAC
73ADP3OYJPH4DOQU3G3VS4T66GCP5EQF5FWRRLTLCTSTDGHCEAUQC
5FLTMCXWFLP6MI36R73NDC5ZZGKRB66IXOWY7ZTESTLC7M357H2QC
XZDJ2Z4M2MKWIDXN7EYBYQHGO7P5RSWPUGOQ3W2MHIUF55XQSXHQC
IIDU4QUMJGBATIMHZ6BQEXUUZ5PTSNEG5N2DVGJEOEJINYMNQ3XAC
QBLVLMEM55CW32JBAJGVQEUMA2QOPNBHMP3XNCBR5RIMBNYUAOGAC
OOZ37CBOKZQJO3YP5EARYSJEVVNQZWLJFUFJ3EYCN6WFNSDZOQJAC
BN7PSYS5IMGH4CXNCQZGOWBETO7KY4TKICB4ESZEZVXVGLOPVV7QC
(defun _invoke_init ()
(defun enable-minor-mode-by-pattern (my-pair)
"Enable minor mode if filename match the regexp. MY-PAIR is a cons cell (regexp . minor-mode)."
(if (buffer-file-name)
(if (string-match (car my-pair) buffer-file-name)
(funcall (cdr my-pair)))))
(defun file-read-lines (path)
"Return a list of strings, one for each line in the file at `path`"
(with-temp-buffer
(insert-file-contents path)
(split-string (buffer-string) "\n" t)))
)
(defun _invoke_config ()
(setq helm-ag-base-command "rg --no-heading")
(add-hook
'web-mode-hook
#'(lambda () (enable-minor-mode-by-pattern '("\\.jsx?\\'" . prettier-js-mode))))
;; set javascript modes to indentation to two spaces
(setq-default
js2-basic-offset 2
css-indent-offset 2
web-mode-markup-indent-offset 2
web-mode-code-indent-offset 2
web-mode-attr-indent-offset 2)
(autoload 'notmuch "/usr/local/share/emacs/site-lisp/notmuch" "notmuch mail program" t)
(setq notmuch-command "notmuch-remote")
(setq smtpmail-multi-accounts
(quote ((work . ("ccummings@eventbrite.com"
"smtp.gmail.com"
587
"ccummings@eventbrite.com"
nil nil nil nil))
(personal . ("chris@thesogu.com"
"smtp.fastmail.com"
587
"chris@thesogu.com"
nil nil nil nil)))))
(setq smtpmail-multi-default-account 'work)
(setq smtpmail-multi-associations
(quote (("ccummings@eventbrite.com" work)
("chris@thesogu.com" personal))))
(setq send-mail-function 'smtpmail-multi-send-it)
(setq message-kill-buffer-on-exit t)
(setq smtpmail-debug-info t)
(setq smtpmail-debug-verbose t)
)
if test -d ~/dotfiles
set CSVCHECK_HOME ~/dotfiles/csv_validator
source $CSVCHECK_HOME/src/venv/bin/activate.fish
if not pip list --format=columns | rg -q 'csvcheck'
pip install $CSVCHECK_HOME/src/
end
csvcheck $argv
end
#! /usr/bin/env fish
#! /usr/bin/env python
import glob
import os
template = """# -*- mode: snippet -*-
# name: {name}
# key: phab {name}
# --
{name}
"""
load_path = "/Users/ccummings/.evbdevtools/phabricator_users.txt"
save_dir = "/Users/ccummings/dotfiles/emacs_config/snippets/arcanist-mode/"
prefix = "phabricator_username_"
save_path = "{}{}{}".format(save_dir, prefix, "{name}")
with open(load_path) as f:
users = f.readlines()
for old_snippet_file in glob.glob("{}{}*".format(save_dir, prefix)):
os.remove(old_snippet_file)
for name in users:
name = name.strip()
with open(save_path.format(name=name), mode="w") as f:
f.write(name)
print(f"Updated snippets for {len(users)} users.")
/emacs_config/snippets/text-mode/phabricator_username_*