Skip to content

Instantly share code, notes, and snippets.

View sudipstha08's full-sized avatar
πŸ™
Working Remotely

Sudip Shrestha sudipstha08

πŸ™
Working Remotely
View GitHub Profile
@sudipstha08
sudipstha08 / hf.md
Last active October 4, 2025 13:27
Health Factor

Health Factor (HF) Calculation Documentation

What is Health Factor?

Health Factor (HF) is a numerical value that indicates the safety of a user's borrowing position in our Aave-based lending protocol. It's calculated as:

Health Factor = (Total Collateral Value Γ— Liquidation Threshold) Γ· Total Debt Value
@sudipstha08
sudipstha08 / S3-Static-Sites.md
Created March 4, 2024 07:38 — forked from bradwestfall/S3-Static-Sites.md
Use S3 and CloudFront to host Static Single Page Apps (SPAs) with HTTPs and www-redirects. Also covers deployments.

S3 Static Sites

⚠ This post is fairly old. I don't keep it up to date. Be sure to see comments where some people have posted updates

What this will cover

  • Host a static website at S3
  • Redirect www.website.com to website.com
  • Website can be an SPA (requiring all requests to return index.html)
  • Free AWS SSL certs
  • Deployment with CDN invalidation
@sudipstha08
sudipstha08 / vscode.md
Last active March 23, 2023 17:34
VsCode

Move line up and down

 - go to the line you want to move
 - use the ALT + ↑ or ALT + ↓
@sudipstha08
sudipstha08 / editor.md
Last active August 12, 2024 06:59
Text Editors

Vim Editor

Save & Quit in vim

- esc
- :wq
- 

eval $(ssh-agent -s)

@sudipstha08
sudipstha08 / AppDelegate.m
Created March 15, 2023 15:22 — forked from dabit3/AppDelegate.m
Deep Linking Your React Native App Final AppDelegate
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import "AppDelegate.h"
@sudipstha08
sudipstha08 / Shell commands.md
Last active March 20, 2023 17:15
Shell commands

#You can run this command in Terminal, which will append the line to your .bash_profile:

=> echo 'export PATH=/usr/local/bin:$PATH' >>~/.bash_profile
  • .bash_profile is a script that is executed each time you start a new shell. On Linux, it's called under different circumstances than .bashrc, but on OS X, they work exactly the same way. Any command you add to the file will be run whenever you open a new terminal window (thus starting a new interactive shell).

  • $PATH is a variable that tells the shell where to look for executable files - so when you type a command, the system will search each directory specified in that variable until it finds an executable program with that command's name. The command export PATH=/usr/local/bin:$PATH prepends the directory /usr/local/bin to the current PATH, so it becomes the first directory searched by the shell.

  • .bash_profile just a normal plain text file - you can edit it with any text editor, including vi or nano, or even a graphical editor like TextEdit. It'

@sudipstha08
sudipstha08 / linux.md
Last active February 14, 2024 14:00
Linux

UPDATE

sudo apt update && sudo apt upgrade

OPEN FILE

-> cat ~/bash_profile.md

SAVE SOURCE

~/bash_profile.md

OPEN DMG FILE

@sudipstha08
sudipstha08 / redis.md
Last active March 31, 2022 07:08
Redis
  1. sudo service redis-server stop