This file contains hidden or 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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
This file contains hidden or 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
| match "/doktorj", :to => '/jeremiah' |
This file contains hidden or 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
| phong:~/Sites/forks/doktorj/tmp/rhodes-ror[master]$ rake db:drop | |
| phong:~/Sites/forks/doktorj/tmp/rhodes-ror[master]$ rake db:create | |
| phong:~/Sites/forks/doktorj/tmp/rhodes-ror[master]$ rake db:migrate --trace | |
| ** Invoke db:migrate (first_time) | |
| ** Invoke environment (first_time) | |
| ** Execute environment | |
| rake aborted! | |
| SQLite3::SQLException: no such table: materials: SELECT * from materials | |
| WHERE title NOT LIKE '%antique%' | |
| ORDER BY created_at DESC |
This file contains hidden or 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
| { newChatMsg: | |
| { gameId: 99, | |
| fromId: 44, | |
| toId: 55, | |
| msg: 'feh', | |
| sent: "Thu, 12 Apr 2012 01:02:13 GMT" | |
| } | |
| } |
This file contains hidden or 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
| def update | |
| @material = Material.find_using_slug(params[:id]) | |
| redirect_to admin_material_url if @material.nil? | |
| respond_to do |format| | |
| if @material.update_attributes(params[:material]) | |
| unless params[:material][:pdf].nil? | |
| @material.pdf = params[:material][:pdf] | |
| @material.save! |
This file contains hidden or 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
| group :development do | |
| gem 'ruby-prof' | |
| gem 'guard-spork' | |
| end | |
| group :development, :test do | |
| gem 'test-unit', '2.4.8' | |
| gem 'spork', '~> 1.0rc' | |
| gem 'spork-testunit' | |
| gem 'rb-fsevent', '0.4.3.1', :require => false |
This file contains hidden or 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
| @font-face | |
| font-family: 'LucidaSans' | |
| src: url("<%= asset_path('LucidaSans/lucidasansstd-webfont.eot') %> ") | |
| src: url("<%= asset_path('LucidaSans/lucidasansstd-webfont.eot?#iefix') %> ") format("embedded-opentype"), url("<%= asset_path('LucidaSans/lucidasansstd-webfont.woff') %>") format("woff"), url("<%= asset_path('LucidaSans/lucidasansstd-webfont.ttf') %>") format("truetype"), url("<%= asset_path('LucidaSans/lucidasansstd-webfont.svg#LucidaSansStdRoman') %>") format("svg") | |
| font-weight: normal | |
| font-style: normal |
This file contains hidden or 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
| # without shoulda | |
| test "invalid name gives error message" do | |
| @z.name = nil | |
| assert_presence(@z, :name) | |
| end | |
| # with shoulda | |
| class ZombieTest < ActiveSupport::TestCase |
This file contains hidden or 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
| // hey eph - fyi i just got delete image (which includes db info and all associated/resized images,and removes from the dom) but i think it needs some gui cleanup as i was having a hard time selecting the thumbnail .close classes even when i would put the parent classes before hand in the selector. i think it's probably cuz it's conflicting with the other top level .close (for error msg's) - so if you could add a new class like .close_image or better yet, .remove_image that just inherit's the same stylez from .close i think that would help. while you're at it, if you could make the the error/notice message close also inherhit from .close with a name like .close_alert that would be more clear... | |
| i renamed the partial _image_thumbs to _gallery fyi. | |
| also, i couldn't get the = link_to below working, perhaps because of the double .close.close2 class, which means no confirmation popup when you delete an image, even tho it still works. | |
| // _gallery.haml | |
| // = link_to "X", :method => :delete, :confir |
This file contains hidden or 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
| <img class="material_thumb" data-large_image="/system/images/1/large/lighthouse.jpg?1331724339" id="material_thumb_1" name="al" src="/system/images/1/thumb/lighthouse.jpg?1331724339"/> | |
| hi - if i have that tag, how to i extract the data-large_image value with coffeescript and or jquery? | |
| [11:47pm] doktorj: it must be simple | |
| [11:48pm] doktorj: i keep thinking it's something like: large_image = $("material_thumb_#{thumb_id}").data('large_image') and have tried all kinds of combinations, but can't' seem to get the single data value out |
NewerOlder