Skip to content

Instantly share code, notes, and snippets.

View nagapavan's full-sized avatar

Pavan Kunisetty nagapavan

  • Bangalore, India
View GitHub Profile
@nagapavan
nagapavan / Related Links
Last active August 2, 2017 12:44
NodeJS + TypeScript + ExpressJS + Sequelize
@nagapavan
nagapavan / .screenrc
Created October 5, 2017 10:24
Screenrc
# look and feel
caption always "%{= bb}%{+b w}%h %=%{=b rw} %l %{= db} ${USER}@%H %{= dg}%c"
hardstatus alwayslastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<"
# skip the startup message
startup_message off
# Automatically detach on hangup.
autodetach on
@nagapavan
nagapavan / npm-freeze.sh
Created April 25, 2018 09:33
npm hacks
function npm-freeze() {
# npm ls | grep -E "^(├|└)─" | cut -d" " -f2 | awk -v quote='"' 'BEGIN { FS = "@" } ; { print quote $1 quote,":",quote $2 quote"," }' | sed -e 's/ :/:/g'
entries=`npm list --depth=0 -prod true "$@" 2>/dev/null | grep -v "UNMET PEER DEPENDENCY\|peer dep missing" | grep -E "^(├|└)─" | cut -d" " -f2`
echo '"dependencies" : {'
for entry in ${entries}; do
if [[ $entry =~ ^@.* ]]; then
# echo $entry
echo $entry | awk -v quote='"' -v attherate='@' 'BEGIN { FS = "@" }; { print quote attherate $1$2 quote,":",quote $3 quote"," }'
else
@nagapavan
nagapavan / K8S instructions
Created June 29, 2019 09:02
Kubernetes command reference
### Base install
# yum remove -y docker docker-common docker-selinux docker-engine # Optional, use only to cleanup existin Docker
yum -y --nogpgcheck install docker-ce
systemctl daemon-reload;
systemctl enable docker
systemctl restart docker.service
### Setup Kubernetes
## Install Kubernetes
cat << EOF > /etc/yum.repos.d/kubernetes.repo
@nagapavan
nagapavan / Code coverage.md
Created May 23, 2022 04:46 — forked from mems/Code coverage.md
Web frontend code coverage

Every line of code we write today will end up as someone’s legacy code.

Everything that you write is going to disappears some day

RUM Code coverage, chose a 1h timeframe (per day) where 1% traffic run that the test

JS coverage

FES javascript instrimentation visualization

@nagapavan
nagapavan / command.sh
Created August 19, 2022 15:07
Jenkins-Plugin-manager CLI update plugins
/usr/lib/jvm/zulu-11-amd64/bin/java -Djavax.net.ssl.trustStore=/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security/cacerts -jar /opt/jenkins-plugin-manager.jar -w /var/lib/jenkins/jenkins.war --jenkins-update-center http://updates.jenkins.io/update-center.json --available-updates
@nagapavan
nagapavan / 1.sh
Created August 29, 2022 13:33
Node env variable for SSL/TLS reject unauthorized
export NODE_TLS_REJECT_UNAUTHORIZED=true
@nagapavan
nagapavan / Programming notes
Last active January 8, 2024 05:29
Programming notes
https://hiringengineersbook.com/post/autonomy/
A book on Concurrent Programming:
https://lamport.azurewebsites.net/tla/science.pdf