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 methodOverride = require('method-override'); | |
// Method Override | |
app.use(methodOverride(function(req, res){ | |
if (req.body && typeof req.body === 'object' && '_method' in req.body) { | |
// look in urlencoded POST bodies and delete it | |
var method = req.body._method | |
delete req.body._method | |
return method | |
} | |
})); |
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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Darg and drop</title> | |
<style type="text/css"> | |
li { | |
list-style: none; | |
} |
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 lang="en-US"> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>Videochat, step 1</title> | |
</head> | |
<body> | |
<video id="video" width="640" height="480" autoplay></video> | |
<button id="snap">Snap Photo</button> |
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> | |
<meta charset="UTF-8" /> | |
<title>MathML</title> | |
</head> | |
<body> | |
<math> | |
<mrow> | |
<mi>x</mi> |
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> | |
<meta charset="UTF-8" /> | |
<title>SVG</title> | |
</head> | |
<body> | |
<svg width="400" height="400"> |
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> | |
<meta charset="UTF-8" /> | |
<title>Canvas API</title> | |
</head> | |
<body> | |
<canvas id="x" width="300" height="300"></canvas> |
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 lang="pt-BR"> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>Notifier</title> | |
<script> | |
function notify(text){ | |
document.getElementById('msg').innerHTML+='<p>'+text+'</p>' |
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 http = require("http"); | |
var mongoose = require('mongoose'); | |
mongoose.connect('mongodb://localhost/bemean-cascavel'); | |
var db = mongoose.connection; | |
db.on('error', function(err){ | |
console.log('Erro de conexao.', err) | |
}); | |
db.on('open', function () { |
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 data-ng-app="workshopBeMEAN"> | |
<head> | |
<title>{{ workshop }}</title> | |
<style> | |
.user-avatar { | |
width: 200px; | |
} | |
.user-label { |
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
(function(){ | |
'use strict'; | |
angular.module('BeerServiceModule', []) | |
.service('BeerService', BeerService) | |
; | |
function BeerService($http) { | |
var urlBase = '//localhost:3000/beers'; |