Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/ruby
# curious?
system("open", 'suoirucrkoob/yl.tib//:p0h'.gsub('0', 't').reverse)
@ryanisinallofus
ryanisinallofus / _form.haml
Created February 1, 2012 23:31
formtastic nested attr
#issue
%li.ticket_types
= f.inputs :for => :ticket_types do |tt|
<li class="ticket_types"></li>
<li class="input"> <!-- uh oh! ->
...
@ryanisinallofus
ryanisinallofus / just_do_it.txt
Created March 8, 2012 17:48
Do What You Love
Do What You Love
By Raganwald
STOP READING
START DOING
The End
import subprocess
import string
a = 1
while (a < 11):
if a % 2 == 0:
subprocess.call(["say", str(a)])
a = a + 1
subprocess.call(["say", 'booty'])
Failures:
1) EventsController when authorized#create when successful should redirect to the newly created event path
Failure/Error: response.should redirect_to event_path(@event)
Expected response to be a redirect to <http://test.host/events/event85> but was a redirect to <http://test.host/events/event85/edit>
# ./spec/controllers/events_controller_spec.rb:348:in `block (5 levels) in <top (required)>'
2) EventsController when authorized#update when successful should redirect to event show
Failure/Error: response.should redirect_to event_path(@event)
Expected response to be a redirect to <http://test.host/events/event115> but was a redirect to <http://test.host/events/event115/edit>
%a{:href => event_view.list_single(:path), :class => event_view.list_single(:class)}
.overlay_container
.title_overlay
%h1{:class => font_size_class(event_view.name)}= event_view.name
%h2= event_view.poster_showtimes
%h2= event_view.venue.venue_name
- if event_view.attendee_restriction
%h2= event_view.attendee_restriction.friendly_name
.event_image_wrapper
= image_tag event_view.poster_image_url(request.protocol, :medium)
Typical conversation with Trevor Hartman
------------------------------------
Trevor: new Noy Joy EP on spotify is good
Ryan: is that Japandroids?
Trevor: No Joy is the band
Ryan: then I don't like it
DD.directive "add", () ->
(scope, element) ->
element.bind "click", ()->
scope.data.items.push {id: "newID", name: "New Item"}
scope.$apply()
return
Jayden
I love you
Jayden
I love you
You help your parents at their store
Even though you could tell them to fuck off
Jayden
<link rel="import" href="../../lib/core-ajax/core-ajax.html">
<polymer-element name="cxz-vehicle-menu" noscript>
<template>
<core-ajax auto url="{{url}}" handleAs="json" on-core-response="{{ajaxResponse}}"></core-ajax>
<h2>Vehicles</h2>
<template repeat="{{v in vehicles}}">
<li>{{v.year}} {{v.make}} {{v.model}}</li>
</template>
</template>