Skip to content

Instantly share code, notes, and snippets.

View sid24rane's full-sized avatar
🎯
Focusing

Siddhesh Rane sid24rane

🎯
Focusing
View GitHub Profile
@dabit3
dabit3 / marketplace.sol
Last active March 14, 2024 15:55
NFT Marketplace Smart Contract (V2)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "hardhat/console.sol";
contract NFTMarketplace is ERC721URIStorage {
@sid24rane
sid24rane / websqlcrud.js
Created May 31, 2016 09:00
Web SQL Database Basic CRUD ( Create,Read,Update,Delete ) operation implementation!
function createDb() {
var db_name = 'jabber';
var db_version = '1.0';
var db_describe = 'Bro,its jabber';
var db_size = 2048;
var db = openDatabase(db_name, db_version, db_describe, db_size, function(db) {
console.log(db);
console.log("Database opened Successfully! Or created for the first time !");
createTable(db);
});
@sid24rane
sid24rane / ceasar_cipher.js
Created May 14, 2016 15:23
Simple Implementation of Ceasar cipher in JS (In 5min)
function ceaser_cipher(){
this.alphabets=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'];
}
ceaser_cipher.prototype.encrypt=function(s,n){
var plain_text=[...s];
for(var i = 0, length1 = plain_text.length; i < length1; i++){
plain_text[i]=this.alphabets[this.alphabets.indexOf(plain_text[i])+n];
}
return plain_text.toString();