30 Jun 2014
rails new --help
rails new first_application -T -d postgresql
cd first_application
subl .
bundle
bin/rails generate rspec:install
Read more...
26 Jun 2014
<h1>Cool Instagram App</h1>
<form id='search' method="post">
<input type='text' id='tag' placeholder='Enter a tag'>
<button type='submit' id='button'>Search for a tag:</button>
</form>
<div id="target"></div>
Read more...
25 Jun 2014
$(document).ready(function(){
$('#add_profile').on('submit', function(event){
event.preventDefault();
var username = $('#username').val();
$.get('https://api.github.com/users/' + username, function(user){
var newProfile = Mustache.render($('#profile-template').html(), user);
$('.profile-container').append(newProfile);
});
});
});
Read more...
24 Jun 2014
function Football(player1, player2) {
var player1 = 'Italia';
var player2 = 'Uruguay';
};
Football.prototype.loser = function() {
return 'Italia'
};
Read more...
20 Jun 2014
cohort = Cohort.first(:month => 'may')
cohort.update(:status => 'SENIORS')
Read more...