Skip to content

Instantly share code, notes, and snippets.

Engineering Operating Model

System Lifecycle

Design → Build → Verify → Release → Observe → Improve


Trunk based development

Developer
@praveen-krishn
praveen-krishn / System Design.md
Created October 9, 2023 04:38 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@praveen-krishn
praveen-krishn / mainpython.md
Created May 3, 2020 20:14 — forked from rochacbruno/mainpython.md
Use of __main__.py

The use of __main__.py to create executables

myprojectfolder/
    |_ __main__.py
    |_ __init__.py

Being __main__.py:

print("Hello")

@praveen-krishn
praveen-krishn / latency.txt
Created July 29, 2019 06:34 — 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
@praveen-krishn
praveen-krishn / pip install
Created April 27, 2018 08:22
pip install trusted host
pip install --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.org -r requirements.txt
@praveen-krishn
praveen-krishn / autopgsqlbackup
Created July 10, 2017 04:34 — forked from matthewlehner/autopgsqlbackup
Auto PostgreSQL backup script.
#!/bin/bash
#
# PostgreSQL Backup Script Ver 1.0
# http://autopgsqlbackup.frozenpc.net
# Copyright (c) 2005 Aaron Axelsen <axelseaa@amadmax.com>
#
# This script is based of the AutoMySQLBackup Script Ver 2.2
# It can be found at http://sourceforge.net/projects/automysqlbackup/
#
# The PostgreSQL changes are based on a patch agaisnt AutoMySQLBackup 1.9
@praveen-krishn
praveen-krishn / repository.txt
Last active June 29, 2017 06:10
python most used packages
# pip install -r requirements.txt
# refer https://pip.pypa.io/en/stable/reference/pip_install/#example-requirements-file
# refer top packages @ http://pypi-ranking.info/alltime
virtualenv # basic
virtualenvwrapper # wrapper to virtualenvwrapper
pep8 # Code Style Guide
pycodestyle # enforces pep8 style,
pylint # enforces pep8 style
#!/bin/bash
function seed {
echo $1 >> $2;
git add $2;
git commit -m "$1";
}
rm -rf .git
git config --global core.editor vim
----
To Create Stash
$ git stash
To List all stash
$ git stash list
To apply and not delete from stash
$ git stash apply stash@{0}
@praveen-krishn
praveen-krishn / ora_impdp_expdp
Last active August 9, 2016 05:48 — forked from bulain/ora_impdp_expdp.bat
using expdp and impdp in oracle 10g 11g
# For remote usage: https://oracle-base.com/articles/10g/oracle-data-pump-10g
# create directory
create directory dmpdir as 'c:/temp';
select directory_name,directory_path from dba_directories;
# expdp owner
create user scott identified by tiger;
grant connect, resource to scott;
...
grant read, write on directory dmpdir to scott;