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:
- Netflix
- Hulu / HuluPlus
- CBS
- ABC
- MTV
- theWB
- CW TV
- Crackle
| # db/migrate/20200119064500_add_position_column_to_active_storage_attachments.rb | |
| class AddPositionColumnToActiveStorageAttachments < ActiveRecord::Migration[6.0] | |
| def change | |
| add_column :active_storage_attachments, :position, :integer, default: 0 | |
| end | |
| end |
| sudo vi /etc/sysctl.conf | |
| # Add the following to sysctl.conf: | |
| # Decrease TIME_WAIT seconds | |
| net.ipv4.tcp_fin_timeout = 30 | |
| # Recycle and Reuse TIME_WAIT sockets faster | |
| net.ipv4.tcp_tw_recycle = 1 |
| var partitionIterator = function(array, n, step, pad, is_all, result) { | |
| if (_.size(array) < n) { | |
| if (_.isNull(pad) && is_all) return (_.isEmpty(array)) ? result : result.concat([array]); | |
| else if (!_.isNull(pad) && !is_all) return result.concat([array.concat(_.take(pad, n - _.size(array)))]); | |
| else return result; | |
| } | |
| else return partitionIterator(_.rest(array, step), n, step, pad, is_all, result.concat([_.take(array, n)])); | |
| }; | |
| _.mixin({ |
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:
| var parser = document.createElement('a'); | |
| parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
| parser.protocol; // => "http:" | |
| parser.hostname; // => "example.com" | |
| parser.port; // => "3000" | |
| parser.pathname; // => "/pathname/" | |
| parser.search; // => "?search=test" | |
| parser.hash; // => "#hash" | |
| parser.host; // => "example.com:3000" |
| # Bulk API design | |
| # | |
| # resources :posts | |
| class PostsController < ActiveController::Base | |
| # GET /posts/1,4,50,90 | |
| # post_url([ @post, @post ]) | |
| def show_many | |
| @posts = Post.find(params[:ids]) | |
| end |