Skip to content

Instantly share code, notes, and snippets.

View coolsnow02's full-sized avatar

Neha Gujar coolsnow02

  • Cleartrip
  • India
View GitHub Profile
# 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|
<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
<% flash.each do |type, message| %>
<div class="alert <%= bootstrap_class_for(type) %> fade in">
<button class="close" data-dismiss="alert">×</button>
<%= message %>
</div>
<% end %>
# 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
# 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