Skip to content

Instantly share code, notes, and snippets.

View rahul-desai3's full-sized avatar
๐Ÿ‘‹
โœŒ๏ธ

Rahul Desai rahul-desai3

๐Ÿ‘‹
โœŒ๏ธ
View GitHub Profile
@rahul-desai3
rahul-desai3 / Gruntfile.js
Created May 20, 2015 17:24
grunt not staying alive
// Generated on 2015-05-04 using generator-angular 0.11.1
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'
module.exports = function (grunt) {
# Prerender configuration:
<IfModule mod_headers.c>
RequestHeader set X-Prerender-Token "EXTPYjaUpb3wwCWrJHwt"
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
<IfModule mod_proxy_http.c>
@rahul-desai3
rahul-desai3 / send_emails.js
Created July 8, 2015 13:51
Unable to send emails using Haraka
var outbound = require('./outbound');
var plugin = this;
var to = '[email protected]';
var from = '[email protected]';
var contents = [
"From: [email protected]",
"To: [email protected]",
@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) {
@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 / 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 / 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 / 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>

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.
var webshot = require('../lib/webshot');
var options = {
shotSize: {
width: 1024,
height: 'all'
},
renderDelay: 5000
};