Skip to content

Instantly share code, notes, and snippets.

View Pitometsu's full-sized avatar
🐫
∀:camel:.P(:camel:) → ∅ ≡ (∃:camel:.P(:camel:)) → ∅

Yuriy Pitomets Pitometsu

🐫
∀:camel:.P(:camel:) → ∅ ≡ (∃:camel:.P(:camel:)) → ∅
View GitHub Profile
;; 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))
/*
* Nekoboard code
*
* by: Yuriy Pitomets
* license: GNU GPL v. 3
*
*/
const char Key_LEFT_CTRL = 0x80;
;; 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] "
@Pitometsu
Pitometsu / tmux_manager.sh
Created October 18, 2014 00:46
manage tmux, put at end of ~/.zshrc or ~/.bashrc
#!/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
@Pitometsu
Pitometsu / gist:ae404938d4f69a51a9b4
Created November 3, 2014 18:37
cave resolve dev-scm/darcs
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
-- Code challenge.
{-# LANGUAGE NPlusKPatterns #-}
import Control.Monad (guard, liftM)
revert :: Int -- | digit
-> Int -- | with radix
-> Int -- | reverse digit
revert d r = revert' 0 d
@Pitometsu
Pitometsu / skypeid
Created January 6, 2015 11:13
my skype id
pitometsu
#!/bin/sh
set -e
mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt
> "$RESOURCES_TO_COPY"
install_resource()
{
@Pitometsu
Pitometsu / mogen.sh
Last active August 29, 2015 14:15
MOGenerator script
#!/bin/sh
#
# mogen.sh
#
# Created by Jean-Denis Muys on 24/02/11.
# Modified by Ryan Rounkles on 15/5/11 to use correct model version and to account for spaces in file paths
# Edited by MANIAK_dobrii for mogenerator demo
# Updated by Pitomets Yuriy on 22/02/14 to be used in Masjid Timetable project.
# Tip:

localization - 1d

in-app purchase - 1d

advertisement - 4d

social networks integration - 4d

data modelling

database integration - 3d

build proper models - 4d

REST integration - 4d

business logic - 5d

screens