Skip to content

Instantly share code, notes, and snippets.

View excid3's full-sized avatar
:shipit:
Shipping

Chris Oliver excid3

:shipit:
Shipping
View GitHub Profile
describe Cell do
it "can be created" do
expect(Cell.new).to_not eq(nil)
end
it "can tick" do
cell = Cell.new
expect(cell).to respond_to(:tick!)
end
@TodoList = React.createClass
render: ->
`<ul>
{this.props.todos.map(
function(todo, index){
return (<TodoItem key={index} id={todo.id} description={todo.description} completed_at={todo.completed_at} />)
}, this)
}
</ul>`
@excid3
excid3 / ruby.rb
Last active August 29, 2015 14:17
grouped_options = {
'North America' => [['United States','US', attr: :wat], ['Canada', 'CA', attr: :wat]],
}
grouped_options_for_select(grouped_options)
class SignUpLink
constructor: ->
@setEvents()
setEvents: ->
$("#sign-up-link").on "click", @handleClick
handleClick: ->
$(".sign-up-form").show()
$(".sign-in-form").hide()
<input type="hidden" id="init-data" class="json-data" value="{&quot;profileHoversEnabled&quot;:false,&quot;baseFoucClass&quot;:&quot;swift-loading&quot;,&quot;bodyFoucClassNames&quot;:&quot;swift-loading&quot;,&quot;macawSwift&quot;:true,&quot;assetsBasePath&quot;:&quot;https:\/\/abs.twimg.com\/a\/1425667452\/&quot;,&quot;assetVersionKey&quot;:&quot;c509db&quot;,&quot;environment&quot;:&quot;production&quot;,&quot;formAuthenticityToken&quot;:&quot;e0d92bab025125f0ef0c1f83ac79f339c39dfecc&quot;,&quot;isInRemoveDiscoverExperiment&quot;:false,&quot;loggedIn&quot;:true,&quot;screenName&quot;:&quot;excid3&quot;,&quot;fullName&quot;:&quot;Chris Oliver&quot;,&quot;userId&quot;:&quot;14057736&quot;,&quot;allowAdsPersonalization&quot;:true,&quot;scribeBufferSize&quot;:3,&quot;pageName&quot;:&quot;home&quot;,&quot;sectionName&quot;:&quot;home&quot;,&quot;scribeParameters&quot;:{&quot;lang&quot;:&quot;en&quot;},&quot;recaptchaApiUrl&quot;:&quot;https:\/\/www.google.com\/recaptcha\/api\/js\/recaptcha_ajax.js&quot;,&quo
<%= week_calendar events: @meetings do |date, meetings| %>
<%# Print out the date at the top %>
<%= date %>
<% (0..23).each do |hour| %>
<div class="hour-of-day">
<%# Print out the current hour %>
<%= Time.parse("#{hour}:00").strftime("%l %P") %>
require "open-uri"
RUBYGEMS_VERSIONS = {
"1.8" => {
"url" => "https://github.com/rubygems/rubygems/releases/download/v1.8.30/rubygems-update-1.8.30.gem",
"filename" => "rubygems-update-1.8.30.gem"
},
"2.0" => {
"url" => "https://github.com/rubygems/rubygems/releases/download/v2.0.15/rubygems-update-2.0.15.gem",
"filename" => "rubygems-update-2.0.15.gem"
class RepliesController < ApplicationController
require "time"
skip_before_filter :verify_authenticity_token
skip_before_filter :authenticate_teacher!
def receive
# 1. set a @parent based on phone number and/or course number if they exist
# 2/ you then move on to the next state on the parent
@reply = Reply.new
@excid3
excid3 / wistia.js.coffee
Created January 3, 2015 16:34
wistia oembed
class WistiaEmbed
constructor: (original_tag) ->
@base_url = "//fast.wistia.com/oembed/?url="
@account_url = encodeURIComponent("https://home.wistia.com/medias/")
@original_tag = original_tag
@media_id = original_tag.data("wistia-id")
inject: ->
$.getJSON("#{@base_url}#{@account_url}#{@media_id}&format=json&embedType=seo&videoFoam=true&controlsVisibleOnLoad&callback=?", @parse)
<?xml version="1.0" encoding="UTF-8"?>
<feed>
<header>
<id>1</id>
<last_modified>2014-07-20 18:52:55 UTC</last_modified>
</header>
<future>
<entry>
<id>1</id>
<date>2014-07-31 18:30:00 UTC</date>