Skip to content

Instantly share code, notes, and snippets.

View matheustardivo's full-sized avatar

Matheus Tardivo matheustardivo

View GitHub Profile
@matheustardivo
matheustardivo / chat.html
Created April 9, 2012 13:11
Simple Chat app using Node.js and Redis
<!DOCTYPE html>
<html>
<head>
<title>Node.js chat</title>
<link rel="stylesheet" type="text/css" href="bootstrap.min.css" />
<script type="text/javascript" src="jquery-1.7.2.js"></script>
<script type="text/javascript" src="/nowjs/now.js"></script>
<script type="text/javascript">
$(document).ready(function() {
now.receiveMessage = function(time, name, message) {
<% if @url.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@url.errors.count, "error") %> prohibited this url from being saved:</h2>
<ul>
<% @url.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>