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
require 'rubygems' | |
require 'sinatra' | |
require 'fileutils' | |
# upload with: | |
# curl -v -F "data=@/path/to/filename" http://localhost:4567/user/filename | |
post '/:name/:filename' do | |
userdir = File.join("files", params[:name]) |
!!! 5 | |
%html | |
%head | |
%title= "Your Website" | |
%meta{ :content => "", :name => "description" } | |
%meta{ :content => "", :name => "author" } | |
%meta{ :content => "3 days", :name => "revisit-after" } | |
%link{ :href => "http://creativecommons.org/licenses/by/3.0/", :rel => "license", :title => "Creative Commons Attribution 3.0 Unported License" } | |
%link{ :href => "/feed", :rel => "alternate", :title => "Atom", :type => "application/atom+xml" } | |
%link{ :href => "/css/screen.css", :media => "screen", :rel => "stylesheet" } |
# encoding: utf-8 | |
require 'csv' | |
def is_suffix? name | |
case name | |
when "Jr" | |
true | |
when "JR" | |
true |
SSH_USER = 'root' | |
SSH_HOST = 'www.example.com' | |
SSH_DIR = '/var/www/html/www.example.com' | |
desc "Build the website from source" | |
task :build do | |
puts "## Building website" | |
status = system("middleman build --clean") | |
puts status ? "OK" : "FAILED" | |
end |
post '/process' do | |
file = params[:fileupload][:tempfile] | |
json = JSON.parse(open(file).read) | |
# do something with your json here | |
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:
For the last two weeks I've been working flat out with Rubymotion, a new toolchain that allows developers to build native iOS applications using the beautiful, elegant Ruby programming language instead of the verbose and somewhat fussy Objective-C programming language.
The app I've been working on is an existing client app we've been developing for several months. The app was about 80% ready for a pilot launch but still had quite a bit of development to go before being shipped. After discussing Rubymotion with the client, we agreed that it would save us both time and money in future development if we move over to Rubymotion. I was tasked with doing the migration; transposing the entire application to Rubymotion.
For those of you looking to do the same, here are some stats that might help you estimate the time required and the costs
# -*- coding: utf-8 -*- | |
$:.unshift("/Library/RubyMotion/lib") | |
require 'motion/project' | |
# custom rake tasks | |
require '../raketasks/gemerator.rb' | |
desc "Open latest crash log" | |
task :log do | |
app = Motion::Project::App.config |
#!/usr/bin/env ruby | |
# take photo after commit ; ) | |
file="~/.gitshots/#{Time.now.to_i}.jpg" | |
puts "Taking capture into #{file}!" | |
system "imagesnap -q -w 3 #{file}" | |
exit 0 |
This is a simple TextMate command that allows you to preview the current document you're editing right on Marked editor.