This file contains 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
require 'hpricot' | |
require 'open-uri' | |
class PhotosController < ApplicationController | |
IMAGE_SRC = 'http://picasaweb.google.com/data/feed/api/user/kevinherschman?kind=album&access=public' | |
def index | |
doc = Hpricot(open(IMAGE_SRC)) | |
@image_info = (doc/"entry").map do |entry| | |
{ | |
:title => (entry/"media:title").first.inner_text, |
This file contains 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
== ChangeChangesPathLengthLimit: migrating =================================== | |
-- change_column(:changes, :path, :text, {:null=>false}) | |
rake aborted! | |
An error has occurred, all later migrations canceled: | |
Mysql::Error: BLOB/TEXT column 'path' can't have a default value: ALTER TABLE `changes` CHANGE `path` `path` text DEFAUL | |
T '' NOT NULL | |
(See full trace by running task with --trace) |
This file contains 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
<!-- http://localhost:3000/dealerships/31959/vehicles/feed.xml --> | |
<?xml version="1.0" encoding="UTF-8"?> | |
<root> | |
<VEHICLES> | |
<DealerID>31959</DealerID> | |
<VIN>4T4BF3EK3BR169767</VIN> | |
<StockNumber></StockNumber> | |
<Status/> | |
<VehicleType/> | |
<Year>2011</Year> |
This file contains 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
➜ rbxtest bundle | |
Fetching gem metadata from https://rubygems.org/....... | |
Using rake (0.9.2.2) | |
Using i18n (0.6.0) | |
Using multi_json (1.3.2) | |
Using activesupport (3.2.3) | |
Using builder (3.0.0) | |
Using activemodel (3.2.3) | |
Using erubis (2.7.0) | |
Using journey (1.0.3) |
This file contains 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
➜ ~ rbx -v | |
Fatal error loading runtime kernel: | |
Unable to send 'unprintable_chr' on 'Rubinius::CType' (Module) | |
0x7fff6c81b890: Kernel#raise in kernel/alpha.rb:151 (+51) | |
0x7fff6c81c0a0: Kernel#unprintable_chr in kernel/alpha.rb:177 (+34) | |
0x7fff6c81c8d0: Rubinius::CType.toprint in kernel/delta/ctype.rb:21 (+222) | |
0x7fff6c81d100: Rubinius::CType.__module_init__ in kernel/delta/ctype.rb:31 (+74) |
This file contains 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
Mobile.SessionsNewController = Em.ObjectController.extend | |
startEditing: -> | |
@transaction = @get('store').transaction() | |
@set('content', @transaction.createRecord(Mobile.Session, {})) | |
stopEditing: -> | |
@transaction.rollback() | |
@transaction = null | |
save: -> |
This file contains 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
Mobile.SessionsNewController = Em.ObjectController.extend | |
startEditing: -> | |
@transaction = @get('store').transaction() | |
@set('content', @transaction.createRecord(Mobile.Session, {})) | |
stopEditing: -> | |
@transaction.rollback() if @transaction | |
@transaction = null | |
save: -> |
This file contains 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
dealer_in_a_dma_only: | |
user_type: dealer | |
title: dma only | |
message: dma only | |
start_at: <%= Time.now - 3.days %> | |
options: '<%= { :dma => ['san jose'] }.to_yaml %>' | |
dealer_in_a_dma_and_make: | |
user_type: dealer | |
title: dma and make |
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 3 columns, instead of 1 in line 6.
This file contains 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
style_name,cf_body_type,market_class | |
"5dr HB Man","4dr Car","4-door Sub-Compact Passenger Car" | |
"5dr HB Auto","4dr Car","4-door Sub-Compact Passenger Car" | |
"5dr HB Man Sport","4dr Car","4-door Sub-Compact Passenger Car" | |
"5dr HB Auto Sport","4dr Car","4-door Sub-Compact Passenger Car" | |
"5dr HB Auto Sport w/Navi","4dr Car","4-door Sub-Compact Passenger Car" | |
how many body styles do most styles have? | |
'1','29622' |
This file contains 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
module Identifiable | |
extend ActiveSupport::Concern | |
$oids = Set.new | |
included do | |
after_initialize :generate_uuid | |
validates_presence_of :uuid | |
end | |
private |
OlderNewer