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
#!/usr/bin/env ruby | |
=begin | |
* Name: xml.rb | |
* Description parses xml iTunes Music Library and inserts into database | |
so other apps can use, rather than each time parsing xml file | |
* Author: Original - Aaron Patterson (xml parsing portion) | |
http://groups.google.com/group/nokogiri-talk/browse_thread/thread/97973521c6f5f0dc | |
* Additions by rkumar | |
* Date: 2010-08-04 | |
* License: |
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
/* create tables to store itunes music library data for quick access | |
- rkumar 2010 July | |
*/ | |
drop table tracks; | |
create table tracks ( | |
album_artist VARCHAR(50), | |
album_rating_computed INTEGER, | |
album_rating VARCHAR(50), | |
album VARCHAR(50), | |
all_items VARCHAR(50), |
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
<% @articles.each do |article| %> | |
<ul> | |
<li> <%= article.articleName %> </li> | |
</ul> | |
<% end %> |
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
get '/articles/:id' do | |
@article = Articles.get params[:id] | |
set :public_folder, File.dirname(__FILE__) + '/css/styles.css' | |
erb :article | |
end |
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
irb(main):002:0> Articles.count | |
=> 5 | |
irb(main):003:0> Articles.find(1) | |
=> #<Enumerator: Articles:find(1)> |
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
#wrap{ | |
display: block; | |
position: absolute; | |
height: auto; | |
bottom:0; | |
top:0; | |
left:0; | |
right:0; | |
margin-top:50px; | |
margin-bottom:25px; |
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
if(navigator.platform == 'iPad' || navigator.platform == 'iPhone' || navigator.platform == 'iPod') | |
{$("#footer").css({'position' : 'static', 'height' : '50px'});}; | |
}); |
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
# Show full error reports and disable caching | |
config.consider_all_requests_local = true | |
config.action_controller.perform_caching = false | |
# Don't care if the mailer can't send | |
config.action_mailer.raise_delivery_errors = false | |
# Print deprecation notices to the Rails logger | |
config.active_support.deprecation = :log |
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
gem install hipsteripsum | |
hipsteripsum 5 latin | mate |
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
heroku pgbackups:restore DATABASE `heroku pgbackups:url --app instruments2` --app instruments2-staging |
OlderNewer