Streaming just means a download that they don't want you to keep. But Chrome's developer tools make it easy to access what's really going on under the hood.
From the page where you want to download some things, go into your chrome menu to open the developer tools. You can either:
1. (On a mac): Command-option-J
2. (On a PC): Control-alt-J
| class FacebookCommentNotifer | |
| def initialize(comment) | |
| @comment = comment | |
| end | |
| def save | |
| @comment.save && post_to_wall | |
| end | |
| private |
| class MyResource | |
| include HTTParty | |
| debug_output $stdout # <= will spit out all request details to the console | |
| #... | |
| end |
- USB Overdrive
- A non-Apple keyboard with media keys (or keys you want to make "media" keys). For reference, I'm using a Microsoft Sidewinder X4
- Plug in your keyboard and install USB Overdrive.
- Open USB Overdrive. Click into the Settings tab.
- Click the dropdown and select "Any Keyboard, Any Application"
| module AuthHelper | |
| def http_login | |
| user = 'username' | |
| pw = 'password' | |
| request.env['HTTP_AUTHORIZATION'] = ActionController::HttpAuthentication::Basic.encode_credentials(user,pw) | |
| end | |
| end | |
| module AuthRequestHelper | |
| # |
Dear Rubyists,
I just lost a contract because of my code in a Rails project.
The specific code in question is related to a "posting a comment" feature. Here are the details:
In this project, "posting a comment" does not simply entail inserting a row into the database. It involves a procedure to yes, insert a row, but also detect its language, check for spam, send emails, and "share" it to Twitter and Facebook. I believe this algorithm should be encapsulated. I do not believe it belongs in a controller or a model. I do not believe Active Record callbacks should be used.
The "senior developer", whom is the stake holder's right hand man, said this:
| @status_change_pending = ko.observable(false) | |
| @paid = ko.computed({ | |
| owner: @ | |
| read: () => | |
| @status() == 'paid' | |
| write: (value) => | |
| oldVal = @status() # keep track to handle failure | |
| newVal = if value == true then 'paid' else 'to_be_paid' | |
| @status(newVal) |
| user1: | |
| email: [email protected] | |
| encrypted_password: <%= User.new.send(:password_digest, "user123") %> | |
| confirmed_at: <%= Time.now %> |