Created
April 21, 2012 23:19
-
-
Save langalex/2440201 to your computer and use it in GitHub Desktop.
Ruby Script to generate the intro and credits for my Railsgirls Berlin film
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
# encoding: utf-8 | |
require_relative 'type' | |
require 'yaml' | |
30.times {puts} | |
sleep 2 | |
command '"That was: #{event.name} #{Location.current} #{Date.today.year}"', "=> That was: Railsgirls Berlin 2012" | |
command 'event.sponsors.sort', ["Soundcloud", "Wooga", "Readmill", "Travis CI", "betahaus|Berlin", | |
"Railslove", "Amen", "6Wunderkinder", "Kippt", "Geekli.st"].sort.inspect | |
command '"The intro and the credits were programmed in Ruby".source_code.url', '=> "https://gist.github.com/2440201"' | |
command 'music = open("http://soundcloud.com/steyoyoke/im-fine-steyoyoke-podcast-002")', '=> "I\'m Fine - Steyoyoke Podcast #002 by STEYOYOKE"' | |
command '[film.camera, film.sound]', '=> ["Alexander Lang", "Alexander Lang"]' | |
command 'film.edited_by', '=> "Alexander Lang"' | |
command 'film.creative_supervisor', '=> Anika Lindtner' | |
command 'film.producer.urls', '=> ["http://vimeo.com/langalex", "http://alex.io/video"]' | |
command 'puts railsgirls.urls.grep(/berlin/).join("\n")', "http://railsgirls.com/berlin\nhttp://twitter.com/railsgirls_bln\nhttp://groups.google.com/group/railsgirlsberlin" | |
command("event.thanks.to_yaml", {organizers: ["Karri Saarinen", "Linda Liukas", "Pia Henrietta Kekäläinen", | |
"Anna Bessonova"], | |
coaches: ["Konstantin Haase", "Sven Fuchs", "Josh Kalderimis", "Lena Herrmann", "Terrence Lee", | |
"Mari De La Ossa", "Josefine Harzmann", "Ingo Weiss", "Raphaela Wrede", "Patrik Hüsler", | |
"Chris Wörle", "Alex Coles", "Jan Lelis", "Matthias Lüdtke", "Joan Wolkerstorfer", "Duana Stanley", | |
"Patrik Helm", "Timo Herttua"]}.to_yaml) | |
command "ps ax|grep rails", '=> 2375 ?? S 4:49.46 ruby /usr/local/bin/rails s' | |
command "kill 2375", '=> Killed.' | |
sleep 3 | |
puts "\n\nCHUNKY BACON" | |
sleep 1 | |
puts "CHUNKY BACON" | |
sleep 1 | |
puts "CHUNKY BACON" |
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
# encoding: utf-8 | |
require_relative 'type' | |
30.times {puts} | |
sleep 2 | |
command "Date.today", "=> 2012-04-14" | |
command "Location.current", '=> "Berlin, Germany"' | |
command 'event = Event.create name: "Railsgirls"', '=> <#Event: @name="Railsgirls" @reason="Get excited and make things!">' | |
command 'rails new railsgirls', ' | |
create | |
create README | |
create Rakefile | |
create config.ru | |
create .gitignore | |
create Gemfile | |
create app | |
create app/assets/images/rails.png | |
create app/assets/javascripts/application.js | |
create app/assets/stylesheets/application.css | |
create app/controllers/application_controller.rb | |
create app/helpers/application_helper.rb | |
create app/mailers | |
create app/models | |
create app/views/layouts/application.html.erb | |
create app/mailers/.gitkeep | |
create app/models/.gitkeep | |
create config | |
create config/routes.rb | |
create config/application.rb | |
create config/environment.rb | |
create config/environments | |
create config/environments/development.rb | |
create config/environments/production.rb | |
create config/environments/test.rb | |
create config/initializers | |
create config/initializers/backtrace_silencers.rb | |
create config/initializers/inflections.rb | |
create config/initializers/mime_types.rb | |
create config/initializers/secret_token.rb | |
create config/initializers/session_store.rb | |
create config/initializers/wrap_parameters.rb | |
create config/locales | |
create config/locales/en.yml | |
create config/boot.rb | |
create config/database.yml | |
create db | |
create db/seeds.rb | |
create doc | |
create doc/README_FOR_APP | |
create lib | |
create lib/tasks | |
create lib/tasks/.gitkeep | |
create lib/assets | |
create lib/assets/.gitkeep | |
create log | |
create log/.gitkeep | |
create public | |
create public/404.html | |
create public/422.html | |
create public/500.html | |
create public/favicon.ico | |
create public/index.html | |
create public/robots.txt | |
create script | |
create script/rails | |
create test/fixtures | |
create test/fixtures/.gitkeep | |
create test/functional | |
create test/functional/.gitkeep | |
create test/integration | |
create test/integration/.gitkeep | |
create test/unit | |
create test/unit/.gitkeep | |
create test/performance/browsing_test.rb | |
create test/test_helper.rb | |
create tmp/cache | |
create tmp/cache/assets | |
create vendor/assets/stylesheets | |
create vendor/assets/stylesheets/.gitkeep | |
create vendor/plugins | |
create vendor/plugins/.gitkeep | |
done | |
' | |
command 'Applicant.each {|a| a.invite }' | |
# [instagram photos] | |
command 'event.start', '=> "Install Party..."' |
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
def type(cmd) | |
cmd.chars.each do |c| | |
print c | |
sleep rand / 5 | |
STDOUT.flush | |
end | |
puts | |
end | |
def show(text) | |
text.lines.each do |line| | |
puts line | |
sleep 0.01 | |
end | |
end | |
def command(cmd, ret_val = nil) | |
print "\n> " | |
type cmd | |
sleep rand / 5 | |
show ret_val if ret_val | |
sleep 0.5 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment