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
module ArrayInquirer | |
def method_missing method, *args | |
begin | |
select { |elem| elem.send :"#{method}?", *args } | |
rescue NoMethodError | |
super method, *args | |
end | |
end | |
end |
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:
module Abyss | |
ROUNDTRIP = {}.tap { |abyss| abyss.default = abyss }.freeze | |
def to_abyss(obj = self) | |
case obj | |
when Hash | |
obj.inject({}) { |h,(k, v)| h.update k => to_abyss(v) }.tap { |h| h.default = ROUNDTRIP } | |
when Array | |
obj.map { |e| to_abyss(e) } | |
else | |
obj |
require 'tidy' | |
#Tidy.path = '/opt/local/lib/libtidy.dylib' # or where ever your tidylib resides | |
Tidy.path = '/usr/lib/libtidy.A.dylib' | |
def generate(files) | |
tidy = Tidy.open(:show_warnings=>true) do |tidy| | |
tidy.options.indent = 'auto' | |
tidy.options.show_body_only = true | |
tidy.options.output_xhtml = true |
# vim FTW | |
Pry.config.editor = "mvim" | |
# Prompt with ruby version | |
Pry.prompt = [proc { |obj, nest_level| "#{RUBY_VERSION} (#{obj}):#{nest_level} > " }, proc { |obj, nest_level| "#{RUBY_VERSION} (#{obj}):#{nest_level} * " }] | |
if defined?(Rails) && Rails.env | |
begin | |
extend Rails::ConsoleMethods if defined?(Rails::ConsoleMethods) | |
require "rails/console/app" |
#!/bin/bash | |
# Also see: http://vitobotta.com/resque-automatically-kill-stuck-workers-retry-failed-jobs/ | |
[[ -f /tmp/retry-failed-resque-jobs ]] && rm /tmp/retry-failed-resque-jobs | |
ps -eo pid,command | | |
grep [r]esque | | |
grep "Processing" | | |
while read PID COMMAND; do |
For the proper source, and other examples, please see the original gist and the extended version
--colour | |
-I app |
/* jQuery Radiofy | |
* ============== | |
* Turns a select into a hidden text input and | |
* a set of radio buttons that resemble the options. | |
* This is used to enable client_side_validations for radio buttons. | |
* --- | |
* Daniel Kirsch | |
* (c) 2012 Zweitag GmbH | |
*/ | |
(function($){ |
#!/usr/bin/env ruby | |
# List all keys stored in memcache. | |
# Credit to Graham King at http://www.darkcoding.net/software/memcached-list-all-keys/ for the original article on how to get the data from memcache in the first place. | |
require 'net/telnet' | |
headings = %w(id expires bytes cache_key) | |
rows = [] |