This allows you to use the following video streaming services outside of the US from your Mac without having to use a proxy or VPN, so no big bandwidth issues:
- Hulu / HuluPlus
- CBS
- ABC
- MTV
- theWB
- CW TV
- Crackle
- NBC
| class Cocktail | |
| attr_accessor :name | |
| def initialize(name) | |
| @name = name | |
| end | |
| def liquor | |
| case self.name | |
| when "journalist": "gin" | |
| when "sazerac": "whiskey" |
This allows you to use the following video streaming services outside of the US from your Mac without having to use a proxy or VPN, so no big bandwidth issues:
| class ActionDispatch::Routing::Mapper | |
| def draw(routes_name) | |
| instance_eval(File.read(Rails.root.join("config/routes/#{routes_name}.rb"))) | |
| end | |
| end | |
| BCX::Application.routes.draw do | |
| draw :api | |
| draw :account | |
| draw :session |
| require 'right_aws' | |
| s3_credentials = { | |
| :source_key => "...", | |
| :source_secret => "...", | |
| :source_bucket => "...", | |
| :destination_key => "...", | |
| :destination_secret => "...", | |
| :destination_bucket => "..." | |
| } |
| P = programmer; NP = non-programmer | |
| NP: How long will it take? | |
| P: It'll take as long as it takes. | |
| NP: I don't understand. What does that mean? | |
| P: When you tell me that the product is finished, it's done. | |
| NP: You mean you can't estimate how long it'll take? | |
| P: I can't estimate when you'll decide that it is done, therefore an | |
| accurate prediction is impossible. From experience I know that a | |
| project like this can take from three to nine months. A lot |
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2299719/hack.sh | sh | |
| # |
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
| ""PATHOGEN ------------------------------------ | |
| "call pathogen#runtime_append_all_bundles() | |
| "call pathogen#helptags() | |
| "filetype off " required! | |
| "VUNDLE -------------------------------------- | |
| set rtp+=~/.vim/bundle/vundle/ | |
| call vundle#rc() | |
| " let Vundle manage Vundle |
| class PostsController < ActionController::Base | |
| def create | |
| Post.create(post_params) | |
| end | |
| def update | |
| Post.find(params[:id]).update_attributes!(post_params) | |
| end | |
| private |
For a while, I have felt that the following is the correct way to improve the mass assignment problem without increasing the burden on new users. Now that the problem with the Rails default has been brought up again, it's a good time to revisit it.
When creating a form with form_for, include a signed token including all of the fields that were created at form creation time. Only these fields are allowed.
To allow new known fields to be added via JS, we could add: