Skip to content

Instantly share code, notes, and snippets.

downloaded_data.edit().putInt(position+"", percent);
downloaded_data.edit().commit();
if (!download_data.getBoolean("currently_downloading", false))
{
//find the first one whose percent is 0 and start it.
Map<String, ?> items = download_data.getAll();
for(Map.Entry<String,?> entry : items.entrySet()){
if (entry.getValue() instanceof Integer) { //this is a cheap way to test if the key/value pair is 'about' a download. All other values, e.g. 'currently_downloading' are not Integers. This may change.
if (entry.getValue() == 0)
{
Integer position = Integer.parseInt(entry.getKey());
Download d = new Download();
csee /var/www/apps/staging/current: gem --debug update --system
Exception `NameError' at /usr/local/lib/site_ruby/1.8/rubygems/command_manager.rb:134 - uninitialized constant Gem::Commands::UpdateCommand
Updating RubyGems
Exception `Gem::RemoteFetcher::FetchError' at /usr/local/lib/site_ruby/1.8/rubygems/remote_fetcher.rb:164 - bad response Moved Temporarily 302 (http://rubygems.org/latest_specs.4.8)
Exception `Gem::RemoteFetcher::FetchError' at /usr/local/lib/site_ruby/1.8/rubygems/commands/update_command.rb:142 - bad response Moved Temporarily 302 (http://rubygems.org/latest_specs.4.8)
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
bad response Moved Temporarily 302 (http://rubygems.org/latest_specs.4.8)
/usr/local/lib/site_ruby/1.8/rubygems/remote_fetcher.rb:164:in `fetch_size'
/usr/local/lib/site_ruby/1.8/rubygems/spec_fetcher.rb:199:in `l
this.reload = function() {
$.get('myurl', function( data ) {
alert($(this));
});
}
| stories/
| | steps/
| | users/
| | all.rb
| | helper.rb
| | rest_auth_stories.rb
| | rest_auth_stories_helper.rb
Started GET "/about/who-we-are" for 127.0.0.1 at 2013-11-16 17:01:53 -0800
Processing by PagesController#show as HTML
Parameters: {"section"=>"about", "id"=>"who-we-are"}
DEPRECATION WARNING: Relation#first with finder options is deprecated. Please build a scope and then call #first on it instead. (called from show at /Users/benlieb/my_life/sites/2009/briansjourney.com/apps/briansjourney/app/controllers/pages_controller.rb:33)
Page Load (0.4ms) SELECT `pages`.* FROM `pages` WHERE (urltext = 'who-we-are') ORDER BY `pages`.`id` ASC LIMIT 1
Rendered pages/show.html.erb within layouts/application (0.5ms)
Completed 200 OK in 97ms (Views: 91.2ms | ActiveRecord: 0.4ms)
Started PATCH "/pages/brians-story" for 127.0.0.1 at 2013-11-18 22:33:51 -0800
Processing by PagesController#update as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"4FANM+OKSkwz+0NNv4/FweGNGfizVNEyG6upaTeEVV0=", "page"=>{"id"=>"8", "title"=>"Brian's Story ", "urltext"=>"brians-story", "content"=>"<h1 style=\"TEXT-ALIGN: left\" _mce_style=\"text-align: left;\" mce_style=\"text-align: left;\">3 How the Journey Began...Brian's Story</h1>\r\n<div class=\"image_with_caption float_left\"><img title=\"brian's portrait\" alt=\"brian's portrait\" src=\"http://www.briansjourney.com/images/content/brian/brian.jpg\" _mce_src=\"../../images/content/brian/brian.jpg\" mce_src=\"../../images/content/brian/brian.jpg\"> \r\n<div class=\"caption\">Brian Douglas LaViolette <br>1977 - 1992</div></div>\r\n<p>Through great loss has come inspiration.</p>\r\n<p>One family's tragedy has given others the chance to pursue their highest dreams and aspirations.</p>\r\n<p>Today, Brian LaViolette's positive outlook and spirit live
@benlieb
benlieb / Gemfile
Last active December 29, 2015 01:29
source 'http://rubygems.org'
gem "rails", "2.3.14"
gem 'will_paginate', "2.3.16"
gem "money", "1.7.1"
gem "aasm", "0.0.2"
gem "hpricot", "0.6.0"
gem "webrat", "0.2.0"
gem "RedCloth", "4.0.1"
gem "awesome_print"
$ bundle install
Fetching source index from http://rubygems.org/
Using rake (10.1.0) from system gems
Using RedCloth (4.0.1) from bundler gems
Using activesupport (2.3.18) from bundler gems
Using activerecord (2.3.18) from bundler gems
Using aasm (2.3.1) from bundler gems
Using rack (1.1.6) from bundler gems
Using actionpack (2.3.18) from bundler gems
Using actionmailer (2.3.18) from bundler gems
@benlieb
benlieb / gist:7938148
Created December 13, 2013 00:32
RedCloth fails to install
Installing RedCloth (4.0.2)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/benlieb/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb
creating Makefile
make "DESTDIR="
compiling redcloth_attributes.c
ext/redcloth_scan/redcloth_attributes.c: In function ‘redcloth_attribute_parser’:
ext/redcloth_scan/redcloth_attributes.c:445: warning: implicit conversion shortens 64-bit value into a 32-bit value