Skip to content

Instantly share code, notes, and snippets.

View mikepenzin's full-sized avatar

Mike Penzin mikepenzin

  • Haifa, Israel
View GitHub Profile
@aheckmann
aheckmann / storeImgInMongoWithMongoose.js
Created April 17, 2012 19:14
store/display an image in mongodb using mongoose/express
/**
* Module dependencies
*/
var express = require('express');
var fs = require('fs');
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
// img path
@wesleyhales
wesleyhales / LinkedList.js
Created March 12, 2012 19:02
JavaScript LinkedList Example
//I wanted a more elegant linkedlist example than the others, so purely for academic purposes I created one.
var LinkedList = function(e){
var that = {}, first, last;
that.push = function(value){
var node = new Node(value);
if(first == null){
first = last = node;