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
;; helper macro for multiply plugin interaction | |
(defmacro after (mode &rest body) | |
"`eval-after-load' MODE evaluate BODY." | |
(declare (indent defun)) | |
`(if (featurep ,mode) | |
(progn ,@body) | |
(eval-after-load ,mode | |
'(progn ,@body)))) | |
(font-lock-add-keywords 'emacs-lisp-mode |
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
;; insert postfix whitespace | |
(defun insert-postfix-whitespace () | |
"Just insert SPC symbol next to point." | |
(interactive) | |
(save-excursion | |
(insert ?\s) | |
(backward-char))) | |
;; whitespace next to cursor | |
(global-set-key (kbd "S-SPC") 'insert-postfix-whitespace) |
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
;; hack that enable major mode for newly created buffer according to `auto-mode-alist' | |
(defadvice set-buffer-major-mode (after new-buffer-auto-mode activate compile) | |
"Select major mode for newly created buffer. | |
Compare the `buffer-name' the entries in `auto-mode-alist'." | |
(with-current-buffer (ad-get-arg 0) | |
(if (and (buffer-name) (not buffer-file-name)) | |
(let ((name (buffer-name))) | |
;; Remove backup-suffixes from file name. | |
(setq name (file-name-sans-versions name)) |
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
/* | |
* Nekoboard code | |
* | |
* by: Yuriy Pitomets | |
* license: GNU GPL v. 3 | |
* | |
*/ | |
const char Key_LEFT_CTRL = 0x80; |
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
;; eshell prompt | |
(setq eshell-prompt-function | |
(lambda () | |
(let ((user-uid-face (if (zerop (user-uid)) | |
'((t (:inherit (eshell-ls-missing eshell-prompt bold)))) | |
'((t (:inherit (eshell-ls-directory eshell-prompt bold))))))) | |
(concat | |
(propertize (or (ignore-errors | |
(format "[%s] " |
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 | |
# manage Tmux | |
if [ -n "$TMUX" ]; then # in tmux | |
if [ -n "$COLORTERM" ]; then # in rich VT | |
export TERM=xterm-256color-italic | |
fi | |
elif tmux list-sessions &> /dev/null; then | |
tmux attach &> /dev/null # try to attach |
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
20:35 Mon 2014-11-03 ~ ] cave resolve dev-scm/darcs | |
Done: 616 steps | |
These are the actions I will take, in order: | |
s dev-haskell/array:0.4.0.1::haskell 0.4.0.1 to ::installed | |
"Mutable and immutable arrays" | |
doc -hscolour -profile build_options: symbols=compress jobs=9 dwarf_compress -recommended_tests -trace work=tidyup | |
Reasons: dev-scm/darcs-2.8.4-r1:2.8.4::haskell |
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
# git | |
git config --global color.ui true | |
git config --global user.name "Yuriy Pitomets" | |
git config --global user.email [email protected] | |
git config --global push.default simple | |
git config --global gpg.program gpg2 | |
git config --global user.signingkey $MY_GPG_ID | |
git config --global commit.gpgsign true | |
git config --local core.sshCommand "ssh -i ~/.ssh/id_rsa_corp" | |
git config --global rebase.autosquash true |
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
-- Code challenge. | |
{-# LANGUAGE NPlusKPatterns #-} | |
import Control.Monad (guard, liftM) | |
revert :: Int -- | digit | |
-> Int -- | with radix | |
-> Int -- | reverse digit | |
revert d r = revert' 0 d |
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
pitometsu |
OlderNewer