This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
HTTP status code symbols for Rails | |
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings. | |
Status Code Symbol | |
1xx Informational | |
100 :continue | |
101 :switching_protocols | |
102 :processing |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
$(function(){ | |
$('form').on('submit', function(e){ | |
e.preventDefault(); | |
$('#errors').empty(); | |
//EMAIL VALIDATION | |
var email = $('input[name="email"]').val(); | |
if (!(/.+/.test(email))){ | |
$('#errors').append('<li>Insert an Email</li>'); | |
} |
<div id="die"> | |
<% if @roll %> | |
<img src="/<%= @roll.value %>.png" title="<%= @roll.value %>" alt="the roll"> | |
<% end %> | |
</div> |
/* Here is your chance to take over Socrates! | |
Spend 10 minutes on each of the following hacks to the Socrates website. | |
Enter them in the console to make sure it works and then save | |
your results here. | |
Choose a new pair for each. Add your names to the section you complete. | |
*/ | |
/*1. Use basic selectors (id, class, element) to choose an element on the page. | |
Use the .css() method to alter at least two CSS properties of this element. */ |