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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
# | |
# it suits my purposes, no warranty if is suits yours | |
# Iļja Ketris | |
# | |
include "/usr/share/X11/locale/en_US.UTF-8/Compose" | |
<Multi_key> <minus> <greater> : "→" U2192 # RIGHT | |
<Multi_key> <less> <minus> : "←" U2190 # LEFT | |
<Multi_key> <period> <space> : "…" U2026 # HORIZONTAL ELLIPSIS, многоточие |
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
for i in */; do | |
cd $i | |
zip $i * | |
cd .. | |
done |
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
angular.element(document.querySelector('.ng-scope')).injector().get('MyService') |
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
++ id -un | |
+ [[ root != \d\o\k\k\u ]] | |
+ [[ deploy != plugins-install* ]] | |
+ [[ deploy != \p\l\u\g\i\n\s\-\u\p\d\a\t\e ]] | |
+ sudo -u dokku -E -H /usr/local/bin/dokku deploy www | |
++ id -un | |
+ [[ dokku != \d\o\k\k\u ]] | |
+ [[ -n '' ]] | |
+ case "$1" in | |
+ APP=www |
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
for i in *; do | |
((c=0)) | |
for j in $i/*; do | |
((c++)) | |
mv $j $j-$c | |
done | |
done |
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
FROM ubuntu | |
RUN apt-get update | |
RUN DEBIAN_FRONTEND=noninteractive apt-get install postfix postfix-pcre -y --force-yes | |
RUN DEBIAN_FRONTEND=noninteractive apt-get install syslog-ng syslog-ng-core -y --force-yes | |
ADD etc /etc/ | |
RUN cp /etc/resolv.conf /etc/services /var/spool/postfix/etc/ |
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
{- монада это необязательно последовательное исполнение -} | |
import Control.Monad | |
newlist ∷ [(Int, Int)] | |
newlist = | |
do x <- [1..3] | |
y <- [11..12] | |
guard $ x + y > 13 | |
return (x, y) |
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
leap ∷ Coor → Int2 → WithProblem Maybe Move | |
leap src dxy = do | |
let dst = src ~+ dxy | |
sqr ← squareAtM dst | |
kind ← captureM $ colorOnSquare sqr | |
return $ case kind of | |
SimpleMove -> [ Relocate src dst ] | |
CaptureMove -> [ Vacate dst, Relocate src dst ] | |
-- | linear movement by vector ij :: Int2 |
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
data Tree a = Node a (Forest a) | |
type Forest a = [Tree a] |