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
| <h1><%= markdown @post.title %></h1> | |
| <div class="row"> | |
| <div class="col-md-8"> | |
| <small> | |
| <%= image_tag(@post.user.avatar.tiny.url) if @post.user.avatar? %> | |
| submitted <%= time_ago_in_words(@post.created_at) %> ago by | |
| <%= @post.user.name %> | |
| </small> | |
| <p><%= markdown @post.body %></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
| def greet(name) | |
| "Hello #{name}!" | |
| end | |
| # Copy and paste that into irb. | |
| # then type: | |
| # greet("Zaidi") | |
| # Pretty clear, right? | |
| # Now, let's do something a little more interesting. |
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
| # Hi - This is Charles, and I'm going to write just a tiny bit of code. | |
| # I hope it'll clear things up for you. | |
| # I think you're getting tripped up on stuff you've learned before - | |
| # please try to approach this stuff with an open mind. It requires | |
| # patience, but you'll eventually get the hang of it, I promise. | |
| # These early steps are supposed to be hard! Patience now will | |
| # pay off tenfold in a few weeks. | |
| # I see you doing things that you must have seen in other languages! | |
| # That's cool, but please be patient and really |
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
| module.exports = function liveReload(opt) { | |
| var opt = opt || {}; | |
| var port = opt.port || 35729; | |
| var excludeList = opt.excludeList || ['.woff', '.js', '.css', '.ico']; | |
| function getSnippet() { | |
| /*jshint quotmark:false */ | |
| var snippet = [ | |
| "<!-- livereload script -->", | |
| "<script type=\"text/javascript\">document.write('<script src=\"http://'", |
NewerOlder