This file contains hidden or 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
# gem install taglib-ruby | |
# http://robinst.github.io/taglib-ruby/ | |
require 'taglib' | |
require 'fileutils' | |
module Musix | |
def self.extract(dir, tag_name) | |
Dir.foreach(dir) do |x| | |
file = (dir.split("").last=="/" ? dir : dir+"/") + x | |
if !File.directory?(file) && file.match(/.mp3$/) | |
TagLib::FileRef.open(file) do |fr| |
This file contains hidden or 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
<virtualhost *:80> | |
ServerName app.com | |
ServerAlias www.app.com | |
DocumentRoot /var/www/html/blog/public # <-- be sure to point to 'public'! | |
setenv RAILS_ENV production | |
<Directory /var/www/html/blog/public> | |
AllowOverride All | |
RailsEnv production | |
</Directory | |
ErrorLog /var/log/apache2/blog_error_log |
This file contains hidden or 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
<% flash.each do |type, message| %> | |
<div class="alert <%= bootstrap_class_for(type) %> fade in"> | |
<button class="close" data-dismiss="alert">×</button> | |
<%= message %> | |
</div> | |
<% end %> |
This file contains hidden or 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
# MySQL. Versions 4.1 and 5.0 are recommended. | |
# | |
# Install the MySQL driver: | |
# gem install mysql2 | |
# | |
# And be sure to use new-style password hashing: | |
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html | |
development: | |
adapter: mysql2 | |
encoding: utf8 |
This file contains hidden or 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
# NOTE below gems are only for development purpose can be removed and commented out as per requirement | |
group :development do | |
gem 'rails-erd','1.0.0' | |
gem 'hirb','0.7.0' | |
gem 'railroady' | |
gem 'itslog','0.6.1' | |
gem 'quiet_assets' | |
gem 'sextant' | |
end |