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
find ~ -name '*.log' -print0 | xargs -0 -L1 stat -f'%z %N' | sort -rn | tee fat-logfiles.txt | head | |
awk '{ total += $1 } END { printf "total: %5.2f MiB\n", total/1024/1024 }' < fat-logfiles.txt |
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:
This script installs a patched version of ruby 1.9.3-p194 with patches for boot-time performance improvements (#66 and #68), and runtime performance improvements (#83 and #84). It also includes the new backported GC from ruby-trunk.
Huge thanks to funny-falcon for the performance patches.
# Just wanted to clarify my points at the meetup last night. | |
# | |
# There were two different issues intertwined: | |
# (1) Whether to use extend or "include as extend" | |
# (2) When using "include as extend", what is the simplest way to achieve the goal? | |
# | |
# My personal opinion is that the answer to (1) is "extend", not "include as extend", but that | |
# is just my personal opinion. My answer to (2) is a more empirical question. | |
# Using the "extend" approach. Again, I personally prefer the simplicity of this approach, but |
# This is the code from my 'There is No Such Thing as Metaprogramming' talk, | |
# which premiered at the Arlington, VA Ruby Users Group on Feb 22nd. | |
# Without the deliver and walk-through to the solution below this example | |
# will be missing quite an important bit of content (mainly the tracking of | |
# 'self' while developing the solution, but it still a useful read. | |
# Here is the Toddler with no metajuju. Note that the developer, as well as | |
# the code, is completely unuaware of the interpreter. A developer with a | |
# background in compiled languages would be comfortable looking at this. |
This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.
You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf
using homebrew.
require 'thread' | |
require 'json' | |
require 'net/http' | |
require 'uri' | |
require 'betabrite' | |
require 'psych' | |
require 'usb' | |
class StreamClient | |
def initialize user, pass |
# autoload concerns | |
module YourApp | |
class Application < Rails::Application | |
config.autoload_paths += %W( | |
#{config.root}/app/controllers/concerns | |
#{config.root}/app/models/concerns | |
) | |
end | |
end |
# First, I suppose you have ruby 1.9.1 or 1.9.2 | |
# Open irb. Execute this: | |
# RubyVM::InstructionSequence.compile_option = { tailcall_optimization: true, trace_instruction: false } | |
# Note, RubyVM::InstructionSequence.compile_option() doesn't have item :trace_instruction, still, you need to specify it. WTF? | |
# Also, it doesn't work if you just put it to the script. Don't know why yet. Tell me (@rofh) if you know. | |
# Then open the file: | |
# require "./tail-recursive" | |
# Then execute function: | |
# fact(30000) |