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

Estimate

  • localization - 1d
  • in-app purchase - 1d
  • advertisement - 4d
  • social networks integration - 4d

data modelling

  • database integration - 3d
@Pitometsu
Pitometsu / super.el
Last active August 29, 2015 14:19
Super key usage in my EMACS config.
;; mac os x style
(global-set-key (kbd "s-S") 'write-file)
(global-set-key (kbd "s-s") 'save-buffer)
(global-set-key (kbd "s-i") 'dired-jump-other-window)
(global-set-key (kbd "s-l") 'goto-line)
(global-set-key (kbd "s-q") 'save-buffers-kill-emacs)
(global-set-key (kbd "s-x") 'kill-region)
(global-set-key (kbd "s-c") 'kill-ring-save)
(global-set-key (kbd "s-v") 'yank)
(global-set-key (kbd "s-a") 'mark-whole-buffer)
@Pitometsu
Pitometsu / zshrc
Created April 24, 2015 07:56
simple ZSH config
# ~/.zshrc
# -*-mode: emacs-lisp; coding: utf-8 -*-
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=10000
SAVEHIST=8000
bindkey -e
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
@Pitometsu
Pitometsu / fonts.el
Last active August 29, 2015 14:20
Fontset configuration for EMACS
;; Faces
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(default ((t (:height 120 :family "Inconsolata LGC")))))
@Pitometsu
Pitometsu / Solver.hs
Last active August 29, 2015 14:21
Moore automat implementation.
{-# LANGUAGE ExistentialQuantification, LambdaCase #-}
{-# LANGUAGE FlexibleInstances, OverlappingInstances #-}
--{-# LANGUAGE TemplateHaskell #-}
-- | Main entry point to the application.
module Main where
--import Data.List (permutations)
import Control.Monad ( replicateM )
import Data.Data ( dataTypeConstrs
hackbook# nixos-rebuild switch --upgrade
downloading Nix expressions from ‘https://nixos.org/releases/nixos/unstable/nixos-16.03pre68239.bd84eba//nixexprs.tar.xz’...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
unpacking channels...
building Nix...
building the system configuration...
these derivations will be built:
/nix/store/2nk1bwq7i63p1qg1pyzkgbyj8i6ff2zl-haskell-token-utils-0.0.0.6.drv
Preprocessing executable 'hobbes' for hobbes-0.2.2...
[1 of 1] Compiling Main ( Hobbes.hs, dist/build/hobbes/hobbes-tmp/Main.dyn_o )
Hobbes.hs:37:21:
Couldn't match type ‘system-filepath-0.4.13.4:Filesystem.Path.Internal.FilePath’
with ‘[Char]’
Expected type: FilePath
Actual type: system-filepath-0.4.13.4:Filesystem.Path.Internal.FilePath
In the second argument of ‘watchTree’, namely
‘(fromText $ pack dir)’
@Pitometsu
Pitometsu / search_and_replace.sh
Created October 30, 2015 00:08 — forked from kates/search_and_replace.sh
bulk search and replace with the silver searcher, awk, sed and xargs
ag "sometext" --nogroup | awk '{print substr($1,1,index($1,":")-1);}' | xargs -I {} sed -i .bak -e 's/sometext/anothertext/g' {}
@Pitometsu
Pitometsu / inconsolata-lgc.nix
Created November 5, 2015 18:50
inconsolata-lgc.nix
(let inconsolata-lgc = let version = "1.2.0";
in with pkgs; stdenv.mkDerivation rec {
name = "inconsolata-lgc-${version}";
src = fetchurl {
url = "https://github.com/MihailJP/Inconsolata-LGC/releases/download/LGC-1.2.0/InconsolataLGC-OT-1.2.0.tar.xz";
sha256 = "0rw8i481sdqi0pspbvyd2f86k0vlrb6mbi94jmsl1kms18c18p66";
};
dontBuild = true;
installPhase = let
fonts_dir = "$out/share/fonts/opentype";
@Pitometsu
Pitometsu / ghci.conf
Last active November 6, 2015 21:50
Fancy GHCi dotfile.
-- Make the prompt a little more colorful.
-- Full prompt
-- :set prompt "\001\ESC[01;35m\002%s \001\ESC[01;34m\002> \001\ESC[m\002\STX"
-- :set prompt2 "\001\ESC[01;35m\002%s \001\ESC[01;31m\002| \001\ESC[m\002\STX"
-- Neat prompt
:set prompt "\001\ESC[33m\002λ \001\ESC[01;34m\002> \001\ESC[m\002\STX"
:set prompt2 "\001\ESC[33m\002λ \001\ESC[01;31m\002| \001\ESC[m\002\STX"