Skip to content

Instantly share code, notes, and snippets.

View v-kolesnikov's full-sized avatar
✍️
I'm writing something just now! You can write me too! 😉

Vasily Kolesnikov v-kolesnikov

✍️
I'm writing something just now! You can write me too! 😉
View GitHub Profile

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

s.split.map { |x| x.mb_chars.capitalize.to_s }.join(" ")
@v-kolesnikov
v-kolesnikov / max_matrix_row_sum.clj
Last active December 20, 2015 08:44
Найти максимальную сумму элементов строки матрицы
(defn solution
[m]
(->> m
(map #(reduce + %))
(apply max)))
(let [m [[1 2 3]
[0 -1 2]
[4 1 -2]]]
(assert (= 6 (solution m))))
@v-kolesnikov
v-kolesnikov / Dockerfile
Created January 27, 2016 15:00 — forked from mokevnin/Dockerfile
python handler for battle.hexlet.io
FROM hexlet/hexlet-base
RUN apt-install python-pip python-dev
RUN apt-install python3-pip python3-dev
RUN pip3 install pytest
ENV PYTHONDONTWRITEBYTECODE 1
@v-kolesnikov
v-kolesnikov / 00_destructuring.md
Created February 6, 2016 17:28 — forked from john2x/00_destructuring.md
Clojure Destructuring Tutorial and Cheat Sheet

Clojure Destructuring Tutorial and Cheat Sheet

(Related blog post)

Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.

Vectors

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from enum import IntEnum, unique
@unique
class Priority(IntEnum):
Lowest = 0
Low = 1
| * * |
| * * |
| * * |
| * * * |
| * * * |
| * * * * |
| * * * * * * * * |
| * * * |
| * * * * * * |
| * * * * * * |

Getting started

vagrant up
vagrant ssh
make install
make start