Skip to content

Instantly share code, notes, and snippets.

View alexclear's full-sized avatar
💭
Trapped in a Vim session

Alex Chistyakov alexclear

💭
Trapped in a Vim session
View GitHub Profile
changed: [prod008] => (item={u'authorized_keys': [u'freehck'], u'name': u'kuber'})
--- before: /home/kuber/.ssh/authorized_keys
+++ after: /Users/chistyakov/.ansible/tmp/ansible-local-12890g7UqBv/tmphxI9yF/authorized_keys.j2
@@ -1,4 +1 @@
-ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDPSD4/7GDGnHuFr/p/ZmDoW0RZ/3bHvoI/s5WwOpARJuqgnzj2CyfiPxkKzvCuncUq8O8FfjnAyyj7pEIV2MSEQnxzoFDfcJHRH4sw68TLlGENUvQjtTqrZQ2fyZ6Nu7dktq4A3aOxV0rVZa2oJMA1V1LFj5y9u9B4Sj1pSuY0HkAF1XHJDyBQUs8ncrBkwakqCw0wKI7aLC6tph4whFzJqs8LSnwrR6kMMyVC2xjaw8vczM1wcYVfc6lPN7tWJTH3GrjQRdEYEJo3VqInoiQ9OKb171fMrp9N1u6a88ffTDdX3Jlgm8MRSItuGkdJ9tNXke/hq7GuKmavx7sMf34d freehck@localhost
-ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAB+wDMkhjpKz21ifO1c5PDjVCL/eDObqDLtXnNwhRrrZA201MOTd0LNq88cXc8pEbB+ZNqqW3pk7M3kw7CsRg+M0FNg79y4ZTyMgPaIqyiy5+o9U9RSV9erXuFJZQziVrkP0/sA3Hpx0KeFKauVh+JszvgtdrO+5n9FlACpDDosq+989S2K40rtGkmlry4vY6/2LfqcYlVXWyzhJUobyiAtEAwa6uPh9uU//qF8uyMmLxJgUtg+nLsreZv7dSlQck4i3lsr+/nirqOzAEYSxO5Y3g1JJtjYlEbVAJMz+fUv9WlfXtl+xtSFZfMz+prJooSB1axw8dap2Ky1kDplad94c3oz6fW
http://ns2.1888.spb.ru/TheArtOfMonitoring.pdf
firewalld:
open_ports:
- 22/tcp
- 80/tcp
- 443/tcp
- 3000/tcp
- 19999/tcp
forwarded_ports:
- { port: 2222, proto: "tcp", toport: 22, toaddr: "192.168.122.25" }
- { port: 2223, proto: "tcp", toport: 22, toaddr: "10.254.254.49" }
С человеком, который открывает в себе basic soft skills, происходит порой удивительная трансформация. Во-первых, он начинает ощущать свою причастность к избранным (видимо, вследствие эффекта Даннинга-Крюгера). Во-вторых, благодаря тому же эффекту, он начинает считать всех остальных мелким обслуживающим персоналом.
Заветной мечтой любого подобного руководителя является набор такой команды, юниты которой не болеют, не стареют и не уходят в декрет (см. внутренние директивы за авторством господина Тинькова, которого лично я считаю эталоном жлоба, надо бы, кстати, счет в его говнобанке закрыть). К счастью, эта мечта на практике неосуществима в данный момент по многим разным причинам.
Одной из таких причин является утечка мозгов, вернее, их отсутствие. Примерно десять лет назад ЖЖ-шное сообщество почему-то считало, что Ктулху хавает мозг (почему? Лавкрафт, вроде, об этом ничего не писал) - так вот, в современном мире Ктулху, питайся он мозгами, не продержался бы и недели за полным исчерпанием кормовой базы. Но та
# user www-data;
worker_processes auto;
pid /home/student/nginx.pid;
events {
worker_connections 4096;
# multi_accept on;
}
http {
export https_proxy="https://student:[email protected]:8080/"
export http_proxy="https://student:[email protected]:8080/"
cd /home/student
sudo apt-get update
sudo apt-get install git
git clone https://github.com/alexclear/nginx.git
sudo apt-get install libpcre3-dev zlib1g-dev
cd /home/student/nginx
./auto/configure
make
@alexclear
alexclear / gist:dc18b2c5599c091dc095
Created March 13, 2015 11:27
Количество метрик в Graphite
root@fe5 ~ find /opt/graphite/storage/whisper -name "*.wsp" | wc -l
18398
root@fe5 ~
@alexclear
alexclear / gist:b291787701026e28910f
Last active August 29, 2015 14:16
LeoFS node recovery issue(?)
When I start "recover node <storage_node_name>" message of type QUEUE_ID_RECOVERY_NODE seems to be
blocking processing of other messages (mainly, QUEUE_ID_PER_OBJECT ones).
I tried to visualize message processing using StatsD:
http://ns2.1888.spb.ru/2015-02-24-024731_1366x768_scrot.png
A graph at the lower right corner depicts calls to
handle_call({consume, ?QUEUE_ID_RECOVERY_NODE, MessageBin}).
It is my understanding that recover_node_callback(Node) should generate a lot
of QUEUE_TYPE_PER_OBJECT messages synchronously for a single QUEUE_ID_RECOVERY_NODE
message but the graph shows that QUEUE_ID_RECOVERY_NODE messages are constantly processed.
@alexclear
alexclear / gist:3130cef0284c217962a8
Created February 13, 2015 21:46
BTRFS restoration
root@hypervisor02 ~ mount -o ro,recovery /dev/sdc3 /mnt
mount: wrong fs type, bad option, bad superblock on /dev/sdc3,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so.
root@hypervisor02 ~
@alexclear
alexclear / gist:43116658971c6e727098
Created July 10, 2014 06:34
ElasticSearch and Graphite proxied by nginx
server {
listen {{ grafana_ext_ip }}:{{ grafana_http_port }}; ## listen for ipv4; this line is default and implied
#listen [::]:80 default ipv6only=on; ## listen for ipv6
root /usr/share/nginx/www/grafana/src;
index index.html index.htm;
auth_basic "Restricted";
auth_basic_user_file htpasswd.grafana;