Skip to content

Instantly share code, notes, and snippets.

View kvedantmahajan's full-sized avatar

K. Vedant Mahajan kvedantmahajan

  • Toppr
  • Bangalore
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
{
this.openDrawer ? (
<VSideDrawer
title="Edit User"
close={this.toggleDrawer}
okText="Save"
okCallback={this.saveUser}
>
Body of drawer
</VSideDrawer>
@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 {
@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')
'use strict';
const express = require('express');
const router = express.Router();
router.get('/', function(req, res) {
res.json([
{
id: 1,
title: 'First note',
@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) => {
@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',