Skip to content

Instantly share code, notes, and snippets.

View rahul-desai3's full-sized avatar
👋
✌️

Rahul Desai rahul-desai3

👋
✌️
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>regex vs JS native test</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@rahul-desai3
rahul-desai3 / index.js
Created October 19, 2015 00:11
Trying nightmare.js
var Nightmare = require('nightmare');
var vo = require('vo');
var link = 'https://www.cordbloodbanking.com/';
vo(run)(function(err, result) {
if (err) throw err;
});
var moduleFnArg1 = 1;
var webshot = require('../lib/webshot');
var options = {
shotSize: {
width: 1024,
height: 'all'
},
script: function() {
window.onload = function() {
if (window.callPhantom === 'function') {
var webshot = require('../lib/webshot');
var options = {
shotSize: {
width: 1024,
height: 'all'
},
renderDelay: 5000
};

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@rahul-desai3
rahul-desai3 / index.html
Created July 16, 2015 12:53
Need to make the ripples go all the way
<paper-ripple>
<paper-tabs selected="x" id='paper-tabs-container' ng-mouseleave='removeHoverStage()' noink>
<paper-tab link ng-mouseover="activateHoverStage(0)">
<a href="#" class="vertical center-center layout" ng-click="scrollToElement('whatIsCordBloodBanking', 0)">What is Cord Blood?</a>
</paper-tab>
<paper-tab link ng-mouseover="activateHoverStage(1)">
<a href="#" class="vertical center-center layout" ng-click="scrollToElement('howDoesCordBloodBankingWork', 1)">How Cord Blood Banking Works</a>
</paper-tab>
<paper-tab link ng-mouseover="activateHoverStage(2)">
<a href="#" class="vertical center-center layout" ng-click="scrollToElement('howToDonateCordBlood', 2)">Donate</a>
@rahul-desai3
rahul-desai3 / email_sender.js
Created July 9, 2015 14:22
Unable to send emails to Gmail
//Lets require/import the HTTP module
var http = require('http');
//Lets define a port we want to listen to
const PORT=1030;
//We need a function which handles requests and send response
function handleRequest(request, response){
response.end('Welcome to Node.js localhost!\nPath Hit: ' + request.url);
}
@rahul-desai3
rahul-desai3 / server.js
Last active August 29, 2015 14:24
Unable to send emails to Gmail account
//Lets require/import the HTTP module
var http = require('http');
//Lets define a port we want to listen to
const PORT=1030;
//We need a function which handles requests and send response
function handleRequest(request, response){
response.end('Welcome to Node.js localhost!\nPath Hit: ' + request.url);
}
@rahul-desai3
rahul-desai3 / server.js
Created July 8, 2015 15:32
Unable to send emails to Haraka email server
//Lets require/import the HTTP module
var http = require('http');
//Lets define a port we want to listen to
const PORT=1030;
//We need a function which handles requests and send response
function handleRequest(request, response){
response.end('Welcome to Node.js localhost!\nPath Hit: ' + request.url);
}
@rahul-desai3
rahul-desai3 / send_emails.js
Created July 8, 2015 14:15
How do I call this plugin to send emails?
var outbound = require('./outbound');
exports.hook_data = function (next, connection) {
this.loginfo("in hook data");
next();
}
exports.hook_data_post = function (next, connection) {