I don't use my AppleTV and I've had a 500GB external HD sitting around that isn't really getting use either. I thought I'd make use of both of these things and see if I could turn my AppleTV into a NAS device that would also allow for BitTorrent downloading and act as a transcoding DLNA MediaServer that I could access from my Xbox 360 and/or PS3.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
As of version 1.1.2, Propane will load and execute the contents of | |
~Library/Application Support/Propane/unsupported/caveatPatchor.js | |
immediately following the execution of its own enhancer.js file. | |
You can use this mechanism to add your own customizations to Campfire | |
in Propane. | |
Below you'll find two customization examples. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get an instance of the Chronologic client | |
chronologic = Chronologic::Client.new | |
# Cache metadata for users, spots, etc. | |
chronologic.object(:user_1, {:name => 'Scott Raymond'}) | |
chronologic.object(:user_2, {:name => 'Josh Williams'}) | |
chronologic.object(:spot_1, {:name => 'Gowalla HQ'}) | |
# Create subscriptions when one user follows another, etc. | |
chronologic.subscribe(:user_2_friends, :user_1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"countries": { | |
"ar": { | |
"country": "Argentina", | |
"table": "PfldJg", | |
"attributes": { | |
"factual_id": { | |
"supported": true, | |
"mapping": "Factual ID" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Sample usage: +caret(bottom, 8px, #000); */ | |
=caret($side, $size, $color) | |
$opposite: opposite-position($side) | |
+stretch(50%,auto,auto,50%) | |
border: $size solid transparent | |
border-#{$opposite}: $size solid $color | |
border-#{$side}: 0 | |
content: '' | |
display: block |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<article> | |
<header> | |
<h3><%= comment.author %></h3> | |
</header> | |
<%= comment.body %> | |
</article> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Role < Module | |
IncompleteInterface = Class.new(RuntimeError) | |
def included(receiver) | |
missing_methods = @public_api.map(&:to_sym) - receiver.public_instance_methods.map(&:to_sym) | |
unless missing_methods.empty? | |
raise IncompleteInterface, | |
"#{receiver} must implement these methods: #{missing_methods.inspect}" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TripsController < ApplicationController | |
class Action < ApplicationController::Action | |
end | |
class New < Action | |
expose(:trip) { Trip.new(params[:trip]) } | |
end | |
class Create < New | |
def call |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Reverb::Actions::WatchListing | |
def self.watch(user, product, listener) | |
if product.owner?(user) | |
listener.failure(I18n.t('flash.watchlist.error_own')) | |
else | |
Reverb::Analytics.track(user, :watch_product) # FIXME, this doesn't belong here | |
user.user_watch_products.create(:product_id => product.id) | |
listener.success | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class UsersController < ApplicationController | |
def create | |
create_user = UserUseCaseFactory.create_user(Responder.new(self) | |
create_user.do(params[:email], params[:password[) | |
end | |
class Responder < SimpleDelegator | |
def success(user) | |
render json: UserSerializer.new(user) |
OlderNewer