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
def create_video_thumb_nails(event) | |
videopath = "#{RAILS_ROOT}/public#{event.video.url}" | |
tpath = "#{RAILS_ROOT}/public/videos/#{event.id}/original/thumbnail.jpg" | |
image_path = "/videos/#{event.id}/original/thumbnail.jpg" | |
system `ffmpeg -itsoffset -30 -i #{videopath} -y -vcodec mjpeg -vframes 1 -an -f rawvideo -s 140x100 #{tpath}` | |
return image_path | |
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
The image http://mywebsite.com/images/mypicture.jpg cannot be displayed, because it contains errors. |
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
describe MessagesController do | |
describe "POST create" do | |
let(:message) { mock_model(Message).as_null_object } | |
before do | |
Message.stub(:new).and_return(message) | |
end | |
it "creates a new message" do | |
Message.should_receive(:new). |
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
describe MessagesController do | |
describe "POST create" do | |
it "saves the message" do | |
lambda { | |
post :create, :message => { "text" => "a quick brown fox" } | |
}.should change(Message, :count).by(1) | |
end | |
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
var Animal = function() { | |
EventEmitter.call(this); | |
}; | |
util.inherits(Animal, EventEmitter); | |
//////////////////////////////////// | |
// QUESTION AREA | |
//////////////////////////////////// |
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
var events = require('events'); | |
function Dog() { | |
} | |
util.inherits(Dog, events.EventEmitter); | |
// This statement will override the current `prototype`, thus losing | |
// the methods from EventEmitter. | |
Dog.prototype = { |
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
# Activate the gem you are reporting the issue against. | |
unless File.exists?('Gemfile') | |
File.write('Gemfile', <<-GEMFILE) | |
source 'https://rubygems.org' | |
gem 'rails', '4.0.0' | |
gem 'pg' | |
GEMFILE | |
system 'bundle' | |
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
Hello World |
I hereby claim:
- I am westoque on github.
- I am westoque (https://keybase.io/westoque) on keybase.
- I have a public key whose fingerprint is D5EA 1B04 A98F E6E6 503B 8A24 6696 E9C5 BAAB 1458
To claim this, I am signing this object: