Skip to content

Instantly share code, notes, and snippets.

View marcamillion's full-sized avatar

Marc Gayle marcamillion

View GitHub Profile
The page build failed with the following error:
The submodule `octopress` was not properly initialized with a `.gitmodules` file.
For information on troubleshooting Jekyll see:
https://help.github.com/articles/using-jekyll-with-pages#troubleshooting
@marcamillion
marcamillion / index.css
Created September 17, 2014 19:11
Word & Character Counter in JS - as originally seen: http://jsfiddle.net/deepumohanp/jZeKu/
#border {
border: 1px solid red;
height: 200px;
width: 100%;
}
textarea {
height: 100%;
width: 100%;
border: 0px;
}
class CreateVideos < ActiveRecord::Migration
def change
create_table :videos do |t|
t.string :video
t.text :meta_info
t.timestamps
end
end
end
# == Schema Information
# Schema version: 20110330215959
#
# Table name: clients
#
# id :integer not null, primary key
# email :string(255)
# user_id :integer
# created_at :datetime
# updated_at :datetime
def total_used
self.each do |upload|
total_size = upload.image_file_size + total_size
end
end
def num_gecko_users_percent
gecko_users = User.where(:plan_id => [1]).count
all_paid_users = User.where(:plan_id => [1, 2, 3, 4]).count
total = gecko_users / all_paid_users
return total.to_f
end
<ul class="tier1">
<li class="projects"><b>5</b> Projects</li>
<li class="tiertitle">Plan1</li>
<li>5 GB Storage</li>
</ul>
<ul class="tier3">
<li class="projects"><b>10</b> Projects</li>
<li class="tiertitle">Plan2</li>
<li>10 GB Storage</li>
<h1>Payment Result</h1>
<div>Thank you for your payment.</div>
<h2>Transaction Details</h2>
<table>
<tr><td>Amount</td><td>$<%= @result.transaction.amount %></td></tr>
<tr><td>Transaction ID:</td><td><%= @result.transaction.id %></td></tr>
<tr><td>First Name:</td><td><%= h @result.transaction.customer_details.first_name %></td></tr>
2011-04-11T19:22:13+00:00 heroku[router]: GET dev-compv.heroku.com/images/right-arrow.png dyno=web.1 queue=0 wait=0ms service=4ms bytes=626
2011-04-11T19:22:13+00:00 heroku[router]: GET dev-compv.heroku.com/stylesheets/jquery-ui/images/ui-bg_flat_75_ffffff_40x100.png dyno=web.1 queue=0 wait=0ms service=4ms bytes=419
2011-04-11T12:22:14-07:00 heroku[nginx]: GET /stylesheets/jquery-ui/images/ui-bg_flat_75_ffffff_40x100.png HTTP/1.1 | 217.199.115.217 | 237 | http | 304
2011-04-11T19:25:13+00:00 app[web.1]:
2011-04-11T19:25:13+00:00 app[web.1]:
2011-04-11T19:25:13+00:00 app[web.1]: Started POST "/comments/18" for 217.199.115.217 at Mon Apr 11 12:25:13 -0700 2011
2011-04-11T19:25:13+00:00 heroku[router]: POST dev-compv.heroku.com/comments/18 dyno=web.1 queue=0 wait=0ms service=118ms bytes=4418
2011-04-11T12:25:14-07:00 heroku[nginx]: POST /comments/18 HTTP/1.1 | 217.199.115.217 | 4469 | http | 500
2011-04-11T19:26:13+00:00 heroku[router]: GET dev-compv.heroku.com/javascripts/tipsy/images/tipsy.gif dyno=web.1 que
# == Schema Information
# Schema version: 20110412101615
#
# Table name: plans
#
# id :integer not null, primary key
# name :string(255)
# storage :float
# num_of_projects :integer
# num_of_clients :integer