- Large File = Original File
- Small File = 900x
- Large File = We output the first slide at 3000x
- Small File = We output the first slide at 900x
- Large File = We output the first page at 3000x
require 'net/http' | |
module Indicare | |
class NewsFeedItemProcessor < Larva::Processor | |
def news_feed_item_created | |
publish_to_flumen | |
end | |
private | |
def publish_to_flumen | |
nfi = MeducationSDK::NewsFeedItem.find(id) |
In my last article I introduced you to Propono - a pub/sub wrapper for Ruby. If you missed it, then I'd recommend going and having a read before you move on to this. To recap, Propono makes it exceptionally easy to publish and subscribe to messages between services using two simple methods:
# Service 1
Propono.listen_to_queue(:user) do |message|
p "Message Received"
p message
end
Instructions for clearing expired DigiCert SSL certificate on OSX by [https://gist.github.com/agraves](agraves) | |
NOTICE: The following instructions "worked for me." Proceed at your own risk. | |
Symptoms: | |
* Visiting several sites, such as github, gravatar, twitter's CDN results in "invalid certificate" errors | |
* For example: http://i.imgur.com/8gPRfI3.png | |
Instructions |
# config/application.rb | |
#... | |
config.autoload_paths += %W(#{config.root}/app/models/namespaces) | |
#... |
#spec/models/product_spec.rb | |
require 'spec_helper' | |
describe Product do | |
before :each do | |
@valid_attributes = {name: "Test Product", | |
user: mock_model(User)} | |
end |
config.force_ssl = true |
require 'rails/application/route_inspector' | |
class Journey::Visitors::Formatter | |
def visit_SYMBOL node | |
key = node.to_sym | |
if value = options[key] | |
consumed[key] = value | |
value # Overritten this line to avoid escaping of characters | |
else |
config.force_ssl = true |
var form_data = //.. Serialise a form | |
// Get token and param from the meta tags | |
var token = $('meta[name="csrf-token"]').attr('content'); | |
var param = $('meta[name="csrf-param"]').attr('content'); | |
// Create url of "/settings/profile?name=Jeremy+Walker&authenticity_token=askdsalewg303y09sd00dshb0b00ac0dffbafds" | |
document.location = "/settings/profile?_method=PUT&" + form_data + "&" + token + "=" + param; |