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
# go to facebook explorer api and get a token, be sure to add user_posts to the app permission!!! | |
graph_api = Koala::Facebook::API.new("your token in here") | |
graph_api.get_connections("me", "posts", { limit: 200 } ) |
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 a transaction which records the details of the notification | |
object.txns.create(:transaction_id => ipn.transaction_id, | |
:amount => ipn.gross, | |
:fee => ipn.fee, | |
:currency_type => ipn.currency, | |
:status => ipn.status, | |
:received_at => ipn.received_at) | |
# if ipn.acknowledge | |
ack = nil |
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
Ok, so I finally fixed the pagination thing, actually this is working for me with mephisto 0.8.2 (using several different themes - skittlish, simpla, metatheme - but that would not make any difference). | |
Here are the steps I've used to fixed pagination thanks to the blog post you can find at this address (FIRS THING FIRST, you have to follow the guidelines on that blog post to fix the pagination and total pages issue!!!) | |
http://railstalk.com/2009/8/12/setting-up-mephisto-articles-pagination | |
Then you can come back here and go on reading through my post. | |
This way I am achieving pagination on several blog categories on my website: I have setup my sections this way (note that I am using several "single" pages in my website such as Home, about us, contact etc etc...) but of course here we need pagination for blog sections that should be configured this way: |
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
set :user, "deploy" | |
set :deploy_to, "/usr/local/www/nb_blog_jekyll" | |
set :jekyll_command, "/usr/local/jekyll/bin/jekyll --lsi" | |
role :web, "blog.new-bamboo.co.uk" | |
task :deploy do | |
run "cd #{deploy_to}; git pull; #{jekyll_command}; exit 0" | |
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
load 'deploy' if respond_to?(:namespace) # cap2 differentiator | |
set :application, "host.name" | |
set :domain, "host.name" | |
set :repository, "git@github.com:user/jekyll-blog.git" | |
set :use_sudo, false | |
set :deploy_to, "/var/www/#{application}" | |
ssh_options[:forward_agent] = true | |
default_run_options[:pty] = true | |
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 'active_support' | |
def ok_failed(condition) | |
if (condition) | |
puts "OK" | |
else | |
puts "FAILED" | |
end | |
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
Cucumber is a Integration test harness, so your features should be | |
specifying who can authenticate via what URLs and your steps should be | |
exercising the controllers an filters that enforce those features. | |
The point being, you should be going through your views and hitting | |
the database, checking to see if the http response body contains what | |
you expect to see and not worrying about directly testing authlogic | |
itself. | |
# Authentication.feature |
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 | |
# Written by Kieran P | |
# http://github.com/KieranP | |
# http://twitter.com/k776 | |
# http://k776.tumblr.com | |
# | |
# Feel free to fork and modify. | |
# If you do, send me a message on | |
# Github details changes and I'll |
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 | |
# Written by Kieran P | |
# http://github.com/KieranP | |
# http://twitter.com/k776 | |
# http://k776.tumblr.com | |
# | |
# Feel free to fork and modify. | |
# If you do, send me a message on | |
# Github details changes and I'll |
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 | |
# Written by Kieran P | |
# http://github.com/KieranP | |
# http://twitter.com/k776 | |
# http://k776.tumblr.com | |
# | |
# Feel free to fork and modify. | |
# If you do, send me a message on | |
# Github details changes and I'll |
OlderNewer