Skip to content

Instantly share code, notes, and snippets.

library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
entity intro is
port (
clk, levin, reset : in std_logic;
pulson, pulsoff : out std_logic
) ;
end entity;
# This
if result.title =~ /(s\d{2}e\d{2})/i
return unless string.match(/#{$1}/i)
end
# Like this?
return if result.title =~ /(s\d{2}e\d{2})/i and not string.match(/#{$1}/i)
@oleander
oleander / gist:802558
Created January 30, 2011 05:04
A callback script for Transmission. Run the gem install on line 3 to get the dependencies. It downloads a subtitle for the movie and unpackes it, if necessary. Tested using Ruby 1.9.2 in OS X 10.6.
#!/usr/bin/env /Users/linus/.rvm/bin/ruby-1.9.2-p136
# encoding: UTF-8
# gem install unpack ruby-growl movie_searcher undertexter
require 'rubygems'
require 'unpack'
require 'ruby-growl'
require 'movie_searcher'
require 'undertexter'

Unpack*(er)* - run files, run

What is Unpack?

Unpack makes it possible to unarchive rar and zip files using ruby.

You pass a directory and it will find all your archive files, unpack and remove them (if you want to).

So how do I use it?

# MY CONSOLE
:env: "{\"MANPATH\"=>\"/usr/local/CrossPack-AVR/man:\", \"TERM_PROGRAM\"=>\"Apple_Terminal\", \"rvm_archive_extension\"=>\"tar.bz2\", \"GEM_HOME\"=>\"/Users/linus/.rvm/gems/ruby-1.9.2-p136\", \"TERM\"=>\"xterm-color\", \"SHELL\"=>\"/bin/bash\", \"IRBRC\"=>\"/Users/linus/.rvm/rubies/ruby-1.9.2-p136/.irbrc\", \"TMPDIR\"=>\"/var/folders/1f/1fUhwDPOEbKkKMwpnG54GU+++TI/-Tmp-/\", \"Apple_PubSub_Socket_Render\"=>\"/tmp/launch-2bv3GB/Render\", \"TERM_PROGRAM_VERSION\"=>\"273\", \"rvm_hook\"=>\"after_cd\", \"MY_RUBY_HOME\"=>\"/Users/linus/.rvm/rubies/ruby-1.9.2-p136\", \"rvm_selfcontained\"=>\"1\", \"rvm_verbose_flag\"=>\"1\", \"USER\"=>\"linus\", \"__shell_array_start\"=>\"0\", \"COMMAND_MODE\"=>\"unix2003\", \"rvm_path\"=>\"/Users/linus/.rvm\", \"SSH_AUTH_SOCK\"=>\"/tmp/launch-TMpaZv/Listeners\", \"__CF_USER_TEXT_ENCODING\"=>\"0x1F5:0:7\\n\", \"rvm_ruby_global_gems_path\"=>\"/Users/linus/.rvm/gems/ruby-1.9.2-p136@global\", \"PATH\"=>\"/Users/linus/.rvm/gems/ruby-1.9.2-p136/bin:/Users/linus/.rvm/gems/ru
#!/bin/sh
if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then
source "$HOME/.rvm/scripts/rvm"
elif [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then
source "/usr/local/rvm/scripts/rvm"
create_table "movies", :force => true do |t|
t.integer "length"
t.float "rating"
t.string "title"
t.integer "year"
t.datetime "created_at"
t.datetime "updated_at"
t.text "plot"
t.string "company"
t.string "trailer"

MovieSearcher - the almighty movie search gem

What is MovieSearcher

MovieSearcher makes it possible to get information about a movie. It uses IMDB's API that their iPhone applications rely on.

It's build on top of maddox's imdb-party but adds some extra functionality and bugs fixes.

What makes this gem so awesome?

MovieSearcher - the almighty movie search gem

What is MovieSearcher

MovieSearcher makes it possible to get information about a movie. It uses IMDB's API that their iPhone applications rely on.

It's build on top of maddox's imdb-party but adds some extra functionality and bugs fixes.

What makes this gem so awesome?

abstract (1.0.0)
actionmailer (3.0.0)
actionpack (3.0.0)
activemodel (3.0.0)
activerecord (3.0.0)
activeresource (3.0.0)
activesupport (3.0.0)
arel (1.0.1)
builder (2.1.2)
bundler (1.0.0)