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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>DOM manipulation with jQuery</title> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
<script type="text/javascript" src="jquery_example.js"></script> | |
</head> | |
<body> | |
<h1> Hello. Welcome to the jQuery DOM Manipulation Challenge! </h1> | |
<div class="mascot"> |
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
%h2 New Project | |
= form_for(@project) do |f| | |
%div{ id: "error_explanation" } | |
- if @project.errors.any? | |
%h2= pluralize(@project.errors.count, "error") | |
Prohibited this project from being saved: | |
%ul | |
- @project.errors.full_messages.each do |msg| | |
%li= msg | |
%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
class BoggleBoard | |
def initialize(dice_grid) | |
@dice_grid = dice_grid | |
end | |
def create_word(*coords) | |
coords.map { |coord| @dice_grid[coord.first][coord.last] }.join("") | |
end | |
def get_row(row) |
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
<div class="row"> | |
<div class="col-md-6"> | |
<h1>Refcodes</h1> | |
Referral discounts for great tech<br> | |
products and services | |
</div> | |
<div class="col-sm-6 message"> | |
Share referral discounts for your favorite web products and services, and redeem discounts for other products and services you want to try out. Oh, and if you see that there is already a post for the same referral deal, don't duplicate it. Otherwise, we might remove it. | |
<br> | |
<span class="pull-right">Thanks!</span> |
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
class BoggleBoard | |
#your code here | |
end | |
dice_grid = [["b", "r", "a", "e"], | |
["i", "o", "d", "t"], | |
["e", "c", "l", "r"], |
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
<div class="panel panel-default"> | |
<div class="panel-heading"> | |
<div class="panel-title"> | |
<h1>Edit <%= resource_name.to_s.humanize %></h1> | |
</div> | |
Current account: <%= resource.plan.name %> | |
</div> | |
<div class="panel-body"> | |
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %> | |
<%= devise_error_messages! %> |
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
(function( $ ){ | |
$.fn.markdownPreview = function() { | |
return this.each(function() { | |
var $this = $(this); | |
$this.wrap( '<div class="markdown_wrap editing"></div>' ); |
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
<div class="jumbotron center"> | |
<h1 class="center-header">Blocipedia</h1> | |
<h2 class="center-header">Social, Markdown Wikis</h2> | |
<br> | |
<div class="row"> | |
<div class="col-sm-5"> | |
<h3>Free Account</h3> | |
<ul> | |
<li>Create unlimited public wikis</li> | |
<li>Collaborate with unlimited users</li> |
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>Select a plan</h1> | |
<div class="row"> | |
<%= form_for @subscription, url: user_subscriptions_path, method: :post, html: { class: 'form-horizontal' } do %> | |
<div class="col-sm-4"> | |
<%= hidden_field_tag :stripe_card_token %> | |
<div class="form-group"> | |
<%= label_tag "Premium" %> |