Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View chrisli30's full-sized avatar

Chris Li chrisli30

View GitHub Profile
@lovelaced
lovelaced / parachain_devops.md
Last active April 8, 2024 11:54
Best practices: administrate a Substrate-based chain

Best practices for maintaining & running substrate-based (para)chain (wip)

  • Ensure all of your systems are kept up-to-date, especially with security updates.
  • Ensure you can fully bootstrap a new system from scratch easily if needed.
  • Upload archive chain backups frequently. Potentially make these available to the community down the road.
  • Have database recovery methods in place.
  • Use infrastructure as code. Never modify anything manually on your servers.
  • Ensure you have a monitoring stack set up WITH alerts (alertmanager/grafana alerts/bots etc).
  • Keep alerts actionable, otherwise they become noise.
  • If a service crashes, make sure it automatically restarts in some way (via systemd or kubernetes).
@amitchhajer
amitchhajer / Count Code lines
Created January 5, 2013 11:08
Count number of code lines in git repository per user
git ls-files -z | xargs -0n1 git blame -w | perl -n -e '/^.*\((.*?)\s*[\d]{4}/; print $1,"\n"' | sort -f | uniq -c | sort -n