Skip to content

Instantly share code, notes, and snippets.

View pcheliniy's full-sized avatar
🐝
Working from home

Denis Ivanov pcheliniy

🐝
Working from home
View GitHub Profile
INFO 👷 Setting up whisper... version=v1.0.0
INFO ✅ Done!
INFO 🕑 Monitoring messages to sign...
INFO Found 6 messages...
INFO Signing message ... msg-id=467099
Signature sent for msg 467099!
INFO Signing message ... msg-id=467100
Signature sent for msg 467100!
INFO Signing message ... msg-id=470001
Signature sent for msg 470001!
@pcheliniy
pcheliniy / subspace_gather_debug_info.sh
Last active September 8, 2022 10:27
subspace_gather_debug_info.sh
#!/bin/bash
printSeparator() {
echo "###############################"
}
tabOutput() {
sed "s/^/\t/"
}
@pcheliniy
pcheliniy / gh-actions-remove-stucked-actions
Last active May 15, 2022 09:28
Remove dangling gh actions
myorg=pcheliniy
repo=chartrepo
### get wf ids, names, paths
gh api repos/${myorg}/${repo}/actions/workflows | jq -r '.workflows | .[] | .id, .name, .path, []'
wf_id=123456789
### remove runs history
gh api repos/${myorg}/${repo}/actions/workflows/${wf_id}/runs | jq -r '.workflow_runs | .[] | .id' | while read line; do
gh api repos/${myorg}/${repo}/actions/runs/$line -X DELETE;

Чеклист по запуску приложения в прод

Общая информация должна быть описана в общей wiki \ readme проекта.

Общая информация должна содержать

  • Название приложение, краткое описание, назначение, и информация о команде \ разработчике которая его поддерживает.
  • Ссылки на дашборды проекта.
  • Информация о людях \ командах которые могут деплоить приложение на прод.
  • Критичность сервиса (тир1 - высоко критичное для бизнеса, тир2 - критичное для внутренних сервисов, тир3 - не критичное)
  • Список критичных эндпойнтов сервиса, которые должны быть закрыты снаружи (basic auth или просто запрещены)
@pcheliniy
pcheliniy / latency.txt
Created December 7, 2018 11:10 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
.DEFAULT_GOAL:=help
SHELL:=/bin/bash
##@ Dependencies
.PHONY: deps
deps: ## Check dependencies
$(info Checking and getting dependencies)
@pcheliniy
pcheliniy / hdp_tips.md
Last active August 27, 2016 00:24
Hadoop Tips and Tricks

Project Concept

  • Iterate cluster sizing to optimize performance and meet actual load patterns

Hardware

  • Clusters with more nodes recover faster
  • The higher the storage per node, the longer the recovery time
  • Use commodity hardware:
    • Use large slow disks (SATA) without RAID (3-6TB disks)
    • Use as much RAM as is cost-effective (96-192GB RAM)
  • Use mainstream CPU with as many cores as possible (8-12 cores)
@pcheliniy
pcheliniy / ambari-service-move.md
Last active August 1, 2018 06:53
Manual move services in ambari
remove components
curl -u admin:admin -H "X-Requested-By: ambari" -X DELETE \
http://ambari:8080/api/v1/clusters/analytics/services/STORM/components/NIMBUS
Add new componentns not attached to host
curl -u admin:admin -H "X-Requested-By: ambari" -X POST \
http://ambari:8080/api/v1/clusters/analytics/services/STORM/components/NIMBUS
pvscan
PV /dev/nbd1 VG vol_es lvm2 [139.70 GiB / 0 free]
PV /dev/nbd2 VG vol_es lvm2 [139.70 GiB / 0 free]
PV /dev/nbd3 VG vol_es lvm2 [139.70 GiB / 0 free]
PV /dev/nbd4 VG vol_es lvm2 [139.70 GiB / 0 free]
PV /dev/nbd5 VG vol_es lvm2 [139.70 GiB / 0 free]
PV /dev/nbd6 VG vol_es lvm2 [139.70 GiB / 0 free]
Total: 6 [838.17 GiB] / in use: 6 [838.17 GiB] / in no VG: 0 [0 ]
#!/bin/bash
function clear_data_dir() {
rm -f /var/lib/mongodb/mongod.lock
rm -rf /var/lib/mongodb/*
rm -rf /var/lib/mongodb/journal
chown -R mongodb:mongodb /var/lib/mongodb
}