Skip to content

Instantly share code, notes, and snippets.

View rgordeev's full-sized avatar

Roman Gordeev rgordeev

View GitHub Profile
@rgordeev
rgordeev / deploy.yml
Last active August 29, 2015 14:20 — forked from mokevnin/Dockerfile
- hosts: localhost
gather_facts: no
tasks:
- local_action:
module: slack
domain: hexlet.slack.com
token: {{ slack_token }}
msg: "deploy started: {{ rails_env }}:{{ hexlet_image_tag }}"
channel: "#operation"
username: "{{ ansible_ssh_user }}"
@rgordeev
rgordeev / The Technical Interview Cheat Sheet.md
Last active August 28, 2015 13:09 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@rgordeev
rgordeev / scala-session-3.exercise.scala
Created November 16, 2015 12:49
scala homework #3
// Натуральные числа
abstract class Nat{
// является ли нулем
def isZero: Boolean
// возвращает предыдущее натуральное число
def predecessor: Nat
// возвращает следущее натуральное число
def successor: Nat = new Succ(this)
// возвращает результат сложения с that
def +(that: Nat): Nat
@rgordeev
rgordeev / scala-session-4.exercise.scala
Created November 30, 2015 12:40
scala homework #4
/**
* User: rgordeev
* Date: 30.11.15
* Time: 16:15
*/
package patmat
import common._
@rgordeev
rgordeev / scala-session-5.exercise.scala
Created December 10, 2015 13:39
scala homework #5
// Lutz Prechelt: An Empirical Comparison of Seven Programming Languages
val in = scala.io.Source.fromURL("http://lamp.epfl.ch/files/content/sites/lamp/files/teaching/progfun/linuxwords.txt")
val words: List[String] = in.getLines().toList
val mnemonics: Map[Char, String] = Map('2' -> "ABC", '3' -> "DEF", '4' -> "GHI", '5' -> "JKL", '6' -> "MNO", '7' -> "PQRS", '8' -> "TUV", '9' -> "WXYZ", '0' -> " ")
/*
Получаем на основе карты `mnemonics` отношение Цифра -> Символ
@rgordeev
rgordeev / springer-free-maths-books.md
Created December 29, 2015 07:16 — forked from bishboria/springer-free-maths-books.md
Springer have made a bunch of books available for free, here are the direct links
@rgordeev
rgordeev / scala-session-7.exercise.scala
Created December 30, 2015 10:31
scala homework #7
implicit class RichList[A](l: List[A]) {
def update(which: Int, what: A): List[A] = {
l.updated(which, what)
}
}
// текущее количество воды в стаканах
type State = List[Int]
trait Move {
@rgordeev
rgordeev / Springer books in mathematics and physics.md
Last active May 17, 2022 11:58
Springer books in mathematics and physics
@rgordeev
rgordeev / install.md
Created May 30, 2016 21:35 — forked from kshvakov/install.md
Установка Postgres-CI

Требования

Для работы необходим PostgreSQL-server 9.5 и, более-менее "свежий", Docker

Настройка сервера баз данных

Т.к. app-server и worker работают в docker-контейнерах, то следует прописать его (докера) сеть в pg_hba.conf

host    all             all  172.17.0.0/24 password
@rgordeev
rgordeev / pyget2.py
Created November 29, 2016 16:14 — forked from benhutchins/pyget2.py
A python download accelerator
#!/usr/bin/env python
#
# pyget2.py
# A python download accelerator
#
# This file uses multiprocessing along with
# chunked/parallel downloading to speed up
# the download of files (if possible).
#
# @author Benjamin Hutchins