Skip to content

Instantly share code, notes, and snippets.

View sagarjethi's full-sized avatar
🏠
Working from home

sagar jethi sagarjethi

🏠
Working from home
View GitHub Profile
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.11;
// ========== External imports ==========
import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/interfaces/IERC2981Upgradeable.sol";
// ========== Internal imports ==========
@solalette
solalette / .deps...github...0xcert...ethereum-erc721...src...contracts...ownership...ownable.sol
Created February 20, 2022 15:38
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev The contract has an owner address, and provides basic authorization control whitch
* simplifies the implementation of user permissions. This contract is based on the source code at:
* https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/ownership/Ownable.sol
*/
contract Ownable
{
@18dew
18dew / Covid Score.md
Last active April 4, 2020 09:40
Covid Score - A Problem definition for tracking covid spread.

Covid Score

Problem Statement

In vast country like india its virtually impossible to test entire population hence we need to develop a solution which derives a risk score for public based on their exposure to infected people over a specificed period of duration. If the exposure is above a threshold limit specified by goverment then person will have to take test.

Purpose of the problem definition is to come up with a scoring mechasim based on intersection and exposure with infected person path.

Ideal scoring mechanism would quantify the level of exposure a person have had with infected person. ( Note the exposure has no upper bound )

The Minimalist DeFi Liquidity Alert - An effective way to manage DeFi bank run risk

What the hell are you babbling about?

For those who have no idea what the title says, I offer my apology here. Finance by itself is a deep topic with many trade-offs, similar to the world of engineering. According to a greate economists Thomas Sowell

There are no solutions, only trade-offs

In the DeFi (Decentralized Finance) sense, as much as we all love the high interest rates, the trade-offs aren't always clear in this nascent industry. The underlying concept is really simple and sound. It goes something like this:

@LukasMusebrink
LukasMusebrink / reinvent-2018-session-videos.md
Last active October 12, 2022 11:25
Links to YouTube videos of AWS re:Invent 2018 sessions

The current list contains 438 sessions. The list will be updated regularly, at least once a day during reinvent. Last update: 2018-12-02 06:58 +00:00

Title Description Video
[NEW LANUCH!] Building modern apps using Amazon DynamoDB transactions (DAT374) DynamoDB transactions enables developers to maintain correctness of their data at scale by adding atomicity and isolation guarantees for multi-item conditional ... IMAGE ALT TEXT{:target="_blank"}
[NEW LAUNCH!] AWS License Manager Deep Dive (CMP393) AWS License Manager is a new service that makes it easy to bring your existing licenses to the AWS cloud and reduce licensing costs. This service offers a ... [IMAGE ALT TEXT](http://www.youtube.com/watch?v=r7pdaM3OAAQ "AWS re:Invent 2018: [NEW LA
@h0bbel
h0bbel / sources.list
Last active May 16, 2024 18:21
/etc/apt/sources.list for Ubuntu 18.04.1 LTS Bionic Beaver
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
@cryppadotta
cryppadotta / 001-Tradingview-Watchlist.md
Last active January 13, 2024 07:16
Tradingview Watchlist Import Files for Crypto Exchanges

Tradingview Watchlist Import Files for Crypto Exchanges

Below you'll find Tradingview import files for Bittrex and Binance BTC-base markets

Ordered by CMC's Market Cap

I use Tradingview and I like to quickly click through all coins on a particular exchange. The files below can be imported into a Tradingview watchlist.

★ ★ ★ If you use these, leave a comment or a star above ★ ★ ★

sudo apt-get update
sudo apt-get install golang-go -y
wget https://dist.ipfs.io/go-ipfs/v0.4.10/go-ipfs_v0.4.10_linux-386.tar.gz
tar xvfz go-ipfs_v0.4.10_linux-386.tar.gz
sudo mv go-ipfs/ipfs /usr/local/bin/ipfs
@AlwaysBCoding
AlwaysBCoding / notes.txt
Last active March 19, 2022 22:56
Ethereum Ðapp Development - Video 1 | Provisioning The Development Environment
// AlwaysBCoding Screencast - Introduction to AWS EC2
https://www.youtube.com/watch?v=jFBbcleSPoY
// Create a new EC2 Instance on aws.amazon.com (Amazon Linux AMI)
// =====================
// edit permissions on pem file
chmod 400 {keyfile}.pem
// ssh into instance, while exposing remote port for remote Atom
@santoshachari
santoshachari / Laravel PHP7 LEMP AWS.md
Last active February 20, 2024 10:00
Laravel 5.x on Ubuntu 16.x, PHP 7.x, Nginx 1.9.x

#Steps to install latest Laravel, LEMP on AWS Ubuntu 16.4 version. This tutorial is the improvised verision of this tutorial on Digitalocean based on my experience.

Install PHP 7 on Ubuntu

Run the following commands in sequence.

sudo apt-get install -y language-pack-en-base
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install zip unzip