Skip to content

Instantly share code, notes, and snippets.

View aditya-vijaykumar's full-sized avatar

Aditya Vijaykumar aditya-vijaykumar

View GitHub Profile
@aditya-vijaykumar
aditya-vijaykumar / Portfolio-Workshop.md
Last active June 11, 2024 17:41
Setting up droplet on DigitalOcean

How to setup the Best Portfolio!

This gist is in reference with the HackClub NMIT workshop - How to setup the Best Portfolio.

Overview

You will be able to setup and host various web app/sites on different subdomains and domains through a single droplet on DigitalOcean. You will also have a professional email ID by the end of it. Please be sure to watch the webinar on YouTube for a clear understanding about the purpose.

Pre-requisite - GitHub Student Developer Pack

Please make sure you have signed up for the GitHub Student Developer Pack. To access your GitHub Education Pack visit, https://hack.af/pack and choose Nitte Meenakshi Institute of Technology - in organisation/club option.

import web3Modal from './providers.js'
import { DID } from 'dids'
import CeramicClient from '@ceramicnetwork/ceramic-http-client'
import { IDXWeb } from '@ceramicstudio/idx-web'
import { publishIDXConfig } from '@ceramicstudio/idx-tools'
const { ThreeIdConnect, EthereumAuthProvider } = require('./../src/index')
const THREEID_CONNECT_URL = 'https://3idconnect.org/index.html'
@aditya-vijaykumar
aditya-vijaykumar / _Airlections.sol
Last active November 14, 2020 15:28
AiRlections smart contract
pragma solidity >=0.4.22 <0.7.0;
pragma experimental ABIEncoderV2;
contract Ownable {
address public owner;
constructor() public {
owner = msg.sender;
}
const express = require('express');
const mongoose = require('mongoose');
const session = require('express-session');
//Express app init
const app = express();
// DB Config
const db = 'mongodb://localhost:27017/test';
#include <iostream>
using namespace std;
class Shape {
protected: double areaValue;
public:
virtual void area() = 0;
};
class Triangle: public Shape {
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
typedef struct node
{
char name[25];
struct node *link;
}name;
import {
ThreeIdConnect,
EthereumAuthProvider,
} from "3id-connect";
import Ceramic from "@ceramicnetwork/http-client";
import { IDX } from "@ceramicstudio/idx";
import web3Modal from "../utils/provider.js";
CREATE TABLE DOCTORS( MLICENSE VARCHAR(10) PRIMARY KEY, FNAME VARCHAR(20) NOT NULL, LNAME VARCHAR(20) NOT NULL, EMAIL VARCHAR(50) UNIQUE NOT NULL, QUALIFICATIONS VARCHAR(255), AGE INT, GENDER CHAR(1), SPECIALIZATION VARCHAR(255), ABOUT VARCHAR(255));
CREATE TABLE DOCTORS_LOGIN(EMAIL VARCHAR(50) UNIQUE REFERENCES DOCTORS(EMAIL) ON DELETE CASCADE, PASSWORD VARCHAR(16));
CREATE TABLE PATIENTS( PATIENT_ID INT PRIMARY KEY AUTO_INCREMENT, FNAME VARCHAR(20) NOT NULL, LNAME VARCHAR(20) NOT NULL, EMAIL VARCHAR(50) UNIQUE NOT NULL, BLOOD_GROUP VARCHAR(6), GENDER CHAR(1), AGE INT, HEIGHT INT, WEIGHT INT, ALLERGIES VARCHAR(255));
ALTER TABLE PATIENTS AUTO_INCREMENT = 4490;
CREATE TABLE PATIENTS_LOGIN(EMAIL VARCHAR(50) UNIQUE REFERENCES PATIENTS(EMAIL) ON DELETE CASCADE, PASSWORD VARCHAR(16));
CREATE TABLE HEALTH_RECORDS(RECORD_NO INT PRIMARY KEY AUTO_INCREMENT, CREATE_DATE DATE, SYMPTOMS VARCHAR(255), MED_CONDITION VARCHAR(255), DIAGNOSIS VARCHAR(1000), MEDICATION VARCHAR(255));
from collections import defaultdict
class PriorityQueue(object):
def __init__(self):
self.queue = []
def __str__(self):
return ' '.join([str(i) for i in self.queue])
# for checking if the queue is empty