Skip to content

Instantly share code, notes, and snippets.

View web3dev6's full-sized avatar
🎯
Focusing

Sarthak Joshi web3dev6

🎯
Focusing
View GitHub Profile
@dabit3
dabit3 / App.js
Created August 11, 2021 15:44
Sign in with Ethereum & Decentralized Identity with Ceramic, IDX, React, and 3ID Connect
import './App.css';
import { useState } from 'react'
import CeramicClient from '@ceramicnetwork/http-client'
import ThreeIdResolver from '@ceramicnetwork/3id-did-resolver'
import { EthereumAuthProvider, ThreeIdConnect } from '@3id/connect'
import { DID } from 'dids'
import { IDX } from '@ceramicstudio/idx'
@web3dev6
web3dev6 / Stack_LinkedList_Implementation_OOP.cpp
Created April 27, 2019 15:05
An object oriented implementation of stack using arrays in C++
// Stack - Object oriented implementation using linked lists
#include <iostream>
using namespace std;
class Node
{
public:
Node* next;
int data;
@brettscott
brettscott / aes-256-cbc-test.js
Last active March 25, 2024 03:44
AES 256 CBC encryption between Golang and Node JS
// Node v6.9.0
//
// TEST FILE (cut down for simplicity)
// To ensure Golang encrypted string can be decrypted in NodeJS.
//
let crypto;
try {
crypto = require('crypto');
@mindplace
mindplace / git_and_github_instructions.md
Last active May 15, 2024 18:05
Pushing your first project to github

1. Make sure git is tracking your project locally

Do you need a refresher on git? Go through Codecademy's git course.

  1. Using your terminal/command line, get inside the folder where your project files are kept: cd /path/to/my/codebase. → You cannot do this simply by opening the folder normally, you must do this with the command line/terminal.
    → Do you need a refresher on using your command line/terminal? I've compiled my favorite resources here.

  2. Check if git is already initialized: git status

@sid24rane
sid24rane / net.js
Last active May 19, 2024 07:28
Simple TCP Client and Server in Node.js (Covering all useful Properties & Methods)
var net = require('net');
// creates the server
var server = net.createServer();
//emitted when server closes ...not emitted until all connections closes.
server.on('close',function(){
console.log('Server closed !');
});
@toboqus
toboqus / btree.cpp
Created November 3, 2015 08:53
Binary tree implementation in c++
#include <iostream>
using namespace std;
struct node{
int value;
node *left;
node *right;
};
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/Book</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.connection.password"></property>
@mycodeschool
mycodeschool / BST_InorderSuccessor_CPP.cpp
Last active October 29, 2023 09:20
C++ program to find Inorder successor in a BST
/* C++ program to find Inorder successor in a BST */
#include<iostream>
using namespace std;
struct Node {
int data;
struct Node *left;
struct Node *right;
};
//Function to find some data in the tree
/* Deleting a node from Binary search tree */
#include<iostream>
using namespace std;
struct Node {
int data;
struct Node *left;
struct Node *right;
};
//Function to find minimum in a tree.
Node* FindMin(Node* root)
@mycodeschool
mycodeschool / PreorderInorderPostorder_CPP.cpp
Last active May 20, 2024 08:50
Binary tree traversal: Preorder, Inorder, Postorder
/* Binary Tree Traversal - Preorder, Inorder, Postorder */
#include<iostream>
using namespace std;
struct Node {
char data;
struct Node *left;
struct Node *right;
};