Skip to content

Instantly share code, notes, and snippets.

View chug2k's full-sized avatar

Charles Lee chug2k

  • San Francisco, CA
View GitHub Profile
@chug2k
chug2k / gist:6859533
Created October 6, 2013 21:49
temp for mitch y
<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>
@chug2k
chug2k / gist:6520262
Last active December 22, 2015 19:29
method practice for zaidi
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.
@chug2k
chug2k / gist:6520211
Last active December 22, 2015 19:29
for zaidi
# 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
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://'",