Skip to content

Instantly share code, notes, and snippets.

View vikpande's full-sized avatar
🇳🇱
:-)

Vikas Pandey vikpande

🇳🇱
:-)
View GitHub Profile
@vikpande
vikpande / .prettierrc.json
Created September 17, 2023 10:23
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.18+commit.87f61d96.js&optimize=false&runs=200&gist=
{
"overrides": [
{
"files": "*.sol",
"options": {
"printWidth": 80,
"tabWidth": 4,
"useTabs": false,
"singleQuote": false,
"bracketSpacing": false
@vikpande
vikpande / shards-plasma-sidechains.md
Last active March 12, 2023 10:26
Blockchain Scalability & Interoperability

| Category | Shards | Plasma | Side chain | |--------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------

Some important details about Solidity specific/ Ethereum (Smart Contracts):
Background:
A contract has functionality (functions) and state (data).
Magic Global Variables: msg, tx, block
Anyone in the world has access to a smart contract (set/ get) the state.
But there are access restrictions that can be configured.
-address type is a 160 bit value, storing external contracts, keypairs.
-public generates a function that can be accessed outside of the contract.
-mapping(address => uint) public balances; complex datatype maps addresses to uint, like hashtables. *** use more advanced datatype
@vikpande
vikpande / Clean Code summary
Created October 5, 2021 07:08
Clean Code by Uncle Bob
Code is clean if it can be understood easily – by everyone on the team.
Clean code can be read and enhanced by a developer other than its original author.
With understandability comes readability, changeability, extensibility and maintainability.
_____________________________________
## General rules
1. Follow standard conventions.
2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
3. Boy scout rule. Leave the campground cleaner than you found it.
4. Always find root cause. Always look for the root cause of a problem.
@vikpande
vikpande / awsvsazure.md
Created April 30, 2021 10:16
AWS & Azure services comparision
TOPIC AWS AZURE FUNCTIONALITY
Compute E
@vikpande
vikpande / cen-decen.md
Created April 30, 2021 10:09
Centralised, Decentralised & Distributed system notes

| Topic | Centralized | Decentralized | Distributed Systems

@vikpande
vikpande / architecture-patterns.md
Last active April 30, 2021 10:14
Architecture patterns

| Topic | N Tier | Web-Queue-Worker | Microservices | Event-driven architecture

@vikpande
vikpande / neo4j workshop
Last active November 15, 2019 17:03
neo4j_workshop_amsterdam - Refactoring large graphs (Excerpt from the training)
On Neo4J Desktop browser console :
To connect to the graph
- Connect:play http://guides.neo4j.com/modeling_sandbox/05_refactoring_large_graphs.html
Steps:
- As our graph gets bigger in size it starts to become unfeasible to refactor the whole thing in one go. Instead we’ll have to update it in batches.
Manual batching
When batching we sacrifice the atomicity that we’d get if we did everything in one transaction. It’s therefore useful to make our refactoring queries idempotent in case we need to re-run them. We also need to decide which node we’re going to center the refactoring around.
@vikpande
vikpande / GDPR_Blockchain.md
Last active December 10, 2018 12:52
GDPR considerations for a Blockchain app (permission-less & public)

GDPR & blockchain for permission-less & public

3 main areas to address

  • Identification of the data controller & data processor
  • Annonymizing the personal data
  • Data subject can exercise certain data subject rights
    • For e.g. Erase data at certain point of time

Data controller or processor - activities ( roles of various participants )

  • Protocol developer (regular developer)
@vikpande
vikpande / ssl_cert_conversion_commands.md
Last active July 4, 2024 04:50
Convert SSL certificates to different formats & generate private key

Use below command to convert certificate format

  1. Convert .CRT to .PEM format
  • openssl x509 -inform der -in c:\Certificate\user2.crt (Your directory path) -out c:\Certificate\certificate_1.pem (Your directory path)
  1. Convert .CRT to .PFX format
  • openssl pkcs12 -export -out c:\Certificate\certificate.pfx -inkey c:\Certificate\certificate_1.pem -in c:\Certificate\user2.crt
  1. Convert .PEM to .DER format
  • openssl x509 -outform der -in c:\Certificate\certificatename.pem -out c:\Certificate\certificatename.der