Skip to content

Instantly share code, notes, and snippets.

View mbuttler's full-sized avatar

Matthew Buttler mbuttler

  • Ottawa, ON
View GitHub Profile
@mbuttler
mbuttler / commands.txt
Created September 2, 2015 02:01
What I type in the bash prompt
rails new MessengerApp
cd MessengerApp
ls
@mbuttler
mbuttler / posts_controller.rb
Created September 5, 2015 18:38
Threadly - Posts Controller
class PostsController < ApplicationController
def index
@new_post = Post.new
@all_posts = Post.order(created_at: :desc).all
end
def new
@new_post = Post.new
end
end
@mbuttler
mbuttler / index.html.erb
Created September 5, 2015 18:39
Threadly - index.html.erb
<div class="header">
<div class="container">
<h1>threadly</h1>
</div>
</div>
<div class="main">
<div class="container">
<!-- Form goes here -->
@mbuttler
mbuttler / posts_controller.rb
Created September 8, 2015 01:08
Stack Level Too Deep
class PostsController < ApplicationController
def index
@new_post = Post.new
@all_posts = Post.order(created_at: :desc).all
end
def new
@new_post = Post.new
end
def create
<!-- my link -->
<div class="col-lg-4"><a class="typeform-share" href="https://maykel2.typeform.com/to/hxAwoM" data-mode="2" target="_blank" style="text-decoration: none; color: black">
<div class="section-head-form out-horizontal" id="contact-form">
<span><i class="fa fa-envelope"></i></span>
<div class="title">Sales Inquiries</div>
<div>Contact our sales team to get started with Speedyrails</div>
</div></a>
<!-- and the script, as you guys provided it -->

Note Box For Docs

Are you super sick of having to write the same CSS for note and caution boxes? Simply copy and paste this CSS action into your stylesheet, add your own notebg and cautionbg, remove the comments, and Bob is your uncle.

Implement it as a div as

or
Super neat!

A Pen by Matthew Buttler on CodePen.

License.

@mbuttler
mbuttler / _pizza-include.md
Created March 6, 2017 15:05
Convenient Pizza Gist

Using Pizza with Kittns

You can simulate pizza by using Kittns or something else that's cute.

Pizza /is/delicious/yum.json

Man, I'm really hung up on pizza today.

Do You want to get some pizza?

$ apt-get pizza

Man, I'm really hung up on pizza today.

Do You want to get some pizza and wings?

$ apt-get pizza -pepperoni -mushrooms -bacon
$ apt-get wings -hot -sideSourCream
$ apt-get drinks -pepsi -drpepper -aranciataRosa