- Зарплатные ожидания
- Whiteboarding
- Quicksort
- Разговор с HR
- Серая ЗП
- Большая премия
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 base64 import b64encode | |
from time import time | |
import os | |
pid = os.getpid() | |
if pid == 1: # для поддержки запуска в контейнерах | |
import socket | |
hostname = socket.gethostname() | |
pid = ord(hostname[0]) + ord(hostname[-1]) |
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
# coding=utf-8 | |
import dpkt | |
import struct | |
TLSExtensionTypes = { | |
0: 'server_name', | |
1: 'max_fragment_length', | |
2: 'client_certificate_url', | |
3: 'trusted_ca_keys', |
#!/usr/bin/env bash
if [ ! -f /tmp/linux ]; then
curl -sS https://www.linux.org.ru/ | egrep -o /tag/[0-9a-z-]+ | sed 's|/tag/||' > /tmp/linux
fi
if [ ! -f /tmp/pron ]; then
curl -sS http://www.xvideos.com/tags | egrep -o /tags/[a-z0-9-]+ | sed 's|/tags/||' > /tmp/pron
fi
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
#!/bin/bash | |
set -euE | |
echo "$0 $* [$$] START" >&2 | |
declare DIR="${1:-.}" | |
declare REMOVE="${2:-no}" | |
at_least_one_output_exists() { |
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
#!/bin/bash | |
set -euE | |
SUCCESS="\\033[1;32m" | |
HEADER="\\033[1;34m" | |
FAILURE="\\033[1;31m" | |
NORMAL="\\033[0;39m" | |
check() { |
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
# 02.10.2016 | |
Гарри Поттер и анапская рыбалка | |
Гарри Поттер и аппаратный маникюр | |
Гарри Поттер и восьмая джава | |
Гарри Поттер и двойная мотивация | |
Гарри Поттер и десктопные интерфейсы | |
Гарри Поттер и домашнее животное | |
Гарри Поттер и ебанутая сука | |
Гарри Поттер и ебнутый клип |
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
#!/usr/bin/env python | |
""" Скрипт сбора текстовой информации из брифингов МО РФ в унифицированный CSV """ | |
# coding: utf-8 | |
import os, re, csv, logging | |
from pathlib import Path | |
from urllib.parse import urlparse | |
import html2text, requests | |
from bs4 import BeautifulSoup |
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
#!/bin/bash | |
set -euE | |
echo "$0 $@ [$$] START" >&2 | |
if [ "${1:-}" == '--help' ]; then | |
echo "Info: $0 - утилита для синхронизации незакоммиченных изменений" | |
echo "Usage: [action=push|pull|once] $0 [CONFIG|<server> <directory> <interval>]" | |
echo "Example: $0 10.20.140.333 /home/xxx/git/yyy/ 300" |
Разрабатывайте скрипты с опциями set -eu
set -e
- падать на ошибкахset -u
- считать ошибкой обращение к неопределенной переменнойset -o pipefail
- заставить пайпы перестать скрывать ошибки предыдущих команд
- максимально быстрое выявление скрытых ошибок в коде.
- не надо самому писать многие проверки значений.
- Это сделает shell-код похожим на нормальный язык программирования, а не на набор последовательно выполняющихся команд, которым на всё пофиг.
NewerOlder