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
require 'sinatra' | |
require 'datamapper' | |
require 'twitter' | |
require 'rubygems' | |
require 'system_timer' | |
require 'resque' | |
require 'resque_scheduler' | |
DataMapper::setup(:default, "sqlite3://#{Dir.pwd}/sbuttler.db") |
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
require 'sinatra' | |
require 'datamapper' | |
require 'twitter' | |
require 'rubygems' | |
require 'system_timer' | |
require 'resque' | |
require 'resque_scheduler' | |
DataMapper::setup(:default, "sqlite3://#{Dir.pwd}/sbuttler.db") |
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
something went wrong | |
#<Twitter::Unauthorized: POST https://api.twitter.com/1/statuses/update.json: 401: Could not authenticate with OAuth.> | |
/var/lib/gems/1.8/gems/twitter-1.5.0/lib/faraday/response/raise_http_4xx.rb:12:in `on_complete' | |
/var/lib/gems/1.8/gems/faraday-0.6.1/lib/faraday/response.rb:9:in `call' | |
/var/lib/gems/1.8/gems/faraday-0.6.1/lib/faraday/response.rb:62:in `on_complete' | |
/var/lib/gems/1.8/gems/faraday-0.6.1/lib/faraday/response.rb:8:in `call' | |
/var/lib/gems/1.8/gems/faraday-0.6.1/lib/faraday/request/url_encoded.rb:14:in `call' | |
/var/lib/gems/1.8/gems/faraday-0.6.1/lib/faraday/request/multipart.rb:13:in `call' | |
/var/lib/gems/1.8/gems/faraday_middleware-0.6.3/lib/faraday/request/oauth.rb:16:in `call' | |
/var/lib/gems/1.8/gems/twitter-1.5.0/lib/faraday/request/multipart_with_file.rb:16:in `call' |
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
require 'sbuttler.rb' | |
# Resque tasks | |
require 'resque/tasks' | |
require 'resque_scheduler/tasks' | |
namespace :resque do | |
task :setup do | |
require 'resque' | |
require 'resque_scheduler' | |
require 'resque/scheduler' |
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
<% if @search_result %> | |
<% @search_result.each do |r| %> | |
<div class="tweet"> | |
<img alt="image" src="<%= r.profile_image_url %>" /> | |
<p><%= r.text %></p><p><abbr class="timeago" title="<%= Time.parse('#{r.created_at}').iso8601 %>"><%= r.created_at %></abbr> <span class="author"><%= r.from_user %></span></p> | |
</div> | |
<% end %> | |
<% else %> | |
<p>No search result found.</p> | |
<% end %> |
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
<#Hashie::Rash created_at="Sun, 03 Jul 2011 02:24:43 +0000" from_user="ApocalypeX" from_user_id=86467271 from_user_id_str="86467271" geo=nil id=87345998241857536 id_str="87345998241857536" iso_language_code="en" metadata=<#Hashie::Rash result_type="recent"> profile_image_url="http://a3.twimg.com/profile_images/1324109244/avatar_normal.gif" source="<a href="http://www.tweetdeck.com" rel="nofollow">TweetDeck</a>" text="@Vindexbody Navbar 100% done captain. Setting in motion step 2. Interaction via Javascript. But I'll leave that for another day." to_user="Vindexbody" to_user_id=103633201 to_user_id_str="103633201"> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<config> | |
<modules> | |
<Demac_Crons> | |
<version>0.0.1</version> | |
</Demac_Crons> | |
</modules> | |
<crontab> | |
<jobs> | |
<demac_crons_removenew> |
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
<?php | |
/** | |
* Demac Media | |
* | |
* NOTICE OF LICENSE | |
* | |
* This source file is subject to the EULA | |
* that is bundled with this package in the file LICENSE.txt. | |
* It is also available through the world-wide-web at this URL: | |
* http://www.demacmedia.com/LICENSE-Magento.txt |
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
<?php | |
//Where $parent is your configurable product object | |
$configurableProduct = Mage::getModel('catalog/product_type_configurable')->setProduct($parent); | |
$simpleCollection = $configurableProduct->getUsedProductCollection()->addAttributeToSelect('*'); | |
foreach($simpleCollection as $simple){ | |
//Do something here to modify your parent product. | |
} |
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
<?xml version="1.0"?> | |
<config> | |
<modules> | |
<Demac_Childsku> | |
<active>true</active> | |
<codePool>local</codePool> | |
</Demac_Childsku> | |
</modules> | |
</config> |