Skip to content

Instantly share code, notes, and snippets.

Avatar

Evgeny Orekhov EvgenyOrekhov

View GitHub Profile
View .asoundrc
ctl.equal {
type equal;
}
pcm.plugequal {
type equal;
# Modify the line below if you do not
# want to use sound card 0.
#slave.pcm "plughw:0,0";
# by default we want to play from more sources at time:
@EvgenyOrekhov
EvgenyOrekhov / challenge.sh
Last active Mar 14, 2018
POSIX shell scripting challenge
View challenge.sh
#!/bin/sh
set -eu
FILES=$(find . -maxdepth 1 -type f | sort)
# -------------- #
# FIX ME #
# vvvvvvvvvvvvvv #
@EvgenyOrekhov
EvgenyOrekhov / work-n-rest.md
Last active May 17, 2020
work-n-rest.sh - a POSIX shell script for executing long running tasks with pauses
View work-n-rest.md

work-n-rest.sh

A POSIX shell script for executing long running tasks with pauses.

Usage examples

Work for 10 seconds, then rest for 10 seconds:

./work-n-rest.sh find ./ -name '*.log'
@EvgenyOrekhov
EvgenyOrekhov / Вёрстка глазами программиста.md
Last active May 17, 2020
Вёрстка глазами программиста
View Вёрстка глазами программиста.md

Вёрстка глазами программиста

Проблемы и их возможные решения

Проблема 1: высокая взаимозависимость между HTML и CSS

  • При необходимости изменить положение элементов на странице возникает необходимость изменять их положение в HTML-коде.
  • При необходимости изменить размеры элементов возникает необходимость изменять вложенность HTML-тегов и их классы.
View Data manipulation exercise.md

Data manipulation exercise

На любом языке программирования написать функцию, которая высчитывает количество задач по каждому статусу для каждого проекта.

Пример входных данных:

projects = [
    {"id": 2, "title": "Canape CRM"},
    {"id": 3, "title": "Мастер"},
View 1-hello-world.js
/*jslint node, es6, maxlen: 80 */
"use strict";
function upperCaser(input) {
return input.toUpperCase();
}
module.exports = upperCaser;
@EvgenyOrekhov
EvgenyOrekhov / A simple Docker and Docker Compose install script for Ubuntu.md
Last active Sep 16, 2021
A simple Docker and Docker Compose install script for Ubuntu
View A simple Docker and Docker Compose install script for Ubuntu.md

A simple Docker and Docker Compose install script for Ubuntu

Usage

  1. sh install-docker.sh
  2. log out
  3. log back in

Links

@EvgenyOrekhov
EvgenyOrekhov / A POSIX shell script for running command-line tools in containers.md
Last active May 17, 2020
docker-run - a POSIX shell script for running command-line tools in containers
View A POSIX shell script for running command-line tools in containers.md

A POSIX shell script for running command-line tools in containers

Install

  1. Clone this repo

    git clone https://gist.github.com/82a78debf7dea8ab1dd4da9c034aee14.git docker-run
    
  2. Create a link to docker-run in your /usr/local/bin/

@EvgenyOrekhov
EvgenyOrekhov / Docker Compose files for PHP development.md
Last active Aug 5, 2021
Simple Docker Compose files for PHP development
View Docker Compose files for PHP development.md

Simple Docker Compose files for PHP development

Apache + PostgreSQL + MySQL

docker-compose -f docker-compose.apache.yml up

nginx + Apache + PostgreSQL + MySQL

docker-compose -f docker-compose.nginx+apache.yml up

nginx + PHP-FPM + PostgreSQL + MySQL

docker-compose -f docker-compose.nginx+php-fpm.yml up