Skip to content

Instantly share code, notes, and snippets.

View kvedantmahajan's full-sized avatar

K. Vedant Mahajan kvedantmahajan

  • Toppr
  • Bangalore
View GitHub Profile
@kvedantmahajan
kvedantmahajan / MainController.js
Last active October 11, 2015 21:27
Install Buttons not working
app.controller('MainController', ['$scope', function($scope) {
$scope.apps = [
{
icon: 'img/move.jpg',
title: 'MOVE',
developer: 'MOVE, Inc.',
price: 0.99
},
{
icon: 'img/shutterbugg.jpg',
@kvedantmahajan
kvedantmahajan / index.js
Last active July 27, 2017 06:52
React node app
'use strict';
const express = require('express'),
notes = require('./routes/rs_notes');
const app = express();
const router = express.Router();
// route middleware that will happen on every request
router.use((req, res, next) => {
'use strict';
const express = require('express');
const router = express.Router();
router.get('/', function(req, res) {
res.json([
{
id: 1,
title: 'First note',
@kvedantmahajan
kvedantmahajan / App.js
Last active July 27, 2017 08:09
A basic React app.js to demonstrate connectivity to Node/Express APIs
import React, {Component} from 'react';
import logo from './logo.svg';
import './App.css';
class App extends Component {
state = {notes: []};
componentDidMount() {
fetch('/api/notes')
@kvedantmahajan
kvedantmahajan / linked_list_OLOO_style.js
Last active December 4, 2018 16:14
Implementation of Linked list in Javascript using OLOO ( Object linked with another object ) style of coding i.e. no "new" keyword and sugar coated classes
/**
* Initialize your data structure here.
*/
var MyLinkedList = {
head: null,
length: 0,
Node: function (val){
return {
{
this.openDrawer ? (
<VSideDrawer
title="Edit User"
close={this.toggleDrawer}
okText="Save"
okCallback={this.saveUser}
>
Body of drawer
</VSideDrawer>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
@kvedantmahajan
kvedantmahajan / package.json
Last active November 17, 2019 14:16
The monorepo project
{
"name": "root",
"private": true,
"workspaces": [
"packages/*"
],
"devDependencies": {
"lerna": "^3.18.4"
}
}
{
"packages": [
"packages/*"
],
"version": "independent",
"npmClient": "yarn",
"useWorkspaces": true
}
@kvedantmahajan
kvedantmahajan / tsconfig.json
Last active November 17, 2019 16:05
tsconfig.json initial
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"rootDir": "packages",