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
<%= 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") %>
<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
class SignUpLink
constructor: ->
@setEvents()
setEvents: ->
$("#sign-up-link").on "click", @handleClick
handleClick: ->
$(".sign-up-form").show()
$(".sign-in-form").hide()
@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)
@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>`
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
#!/usr/bin/python
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
#Newbie programmer
def factorial(x):
if x == 0:
return 1
else:
return x * factorial(x - 1)
print factorial(6)
#First year programmer, studied Pascal
@user = User.find(:all)
@users.each do |fbid|
result = JSON.parse(open(URI.encode("https://graph.facebook.com/me/friends?access_token=#{fbid.utoken}")).read)
@friendsp = result['data'][0]['id']
end
class Person:
population = 0
def __init__(self, name):
self.name = name
Person.population += 1
c = Person("chris")
b = Person("bob")