This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
font-size: 16px; | |
} | |
div { | |
font-size: 1.5em; | |
} | |
h1 { | |
font-size: 2em; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created with JetBrains WebStorm. | |
* User: ynonperek | |
* Date: 1/28/13 | |
* Time: 9:14 PM | |
* | |
* Mongoose plugin that adds a hashed password field | |
*/ | |
var bcrypt = require('bcrypt'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// lastMod.js | |
module.exports = exports = function lastModifiedPlugin (schema, options) { | |
schema.add({ lastMod: Date }) | |
schema.pre('save', function (next) { | |
this.lastMod = new Date | |
next() | |
}) | |
if (options && options.index) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mongoose = require('mongoose'); | |
mongoose.connect('localhost/test'); | |
var Schema = mongoose.Schema; | |
var AlbumSchema = new Schema({ | |
artist: { type: Schema.Types.ObjectId, ref: 'Artist' }, | |
name: String, | |
year: Number, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Mobile Wall</title> | |
<meta name="viewport" content="width=device-width"/> | |
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" /> | |
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script> | |
<script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script> | |
</head> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Canvas Color Picker</title> | |
<meta name="viewport" content="width=device-width"/> | |
<style> | |
canvas { | |
outline: 2px solid blue; | |
display: block; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var e = require('express'); | |
var app = e(); | |
app.get('/style.css', function(r, s) { | |
setTimeout(function() { | |
s.sendfile('style.css'); | |
}, 5000); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var audio = new Audio(); | |
audio.src = 'park.mp3'; | |
parked_btn.addEventListener('click', function() { | |
audio.play(); | |
}); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Task Demo</title> | |
</head> | |
<body> | |
<form> | |
<label for="inp-task">Type Task Here</label> | |
<input type="text" id="inp-task" /> | |
<input type="submit" value="Add" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Nested BB</title> | |
</head> | |
<body> | |
<script type="text/template" id="mbox"> | |
<h1>{{title}}</h1> | |
<div id="messagesView"> |