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
<br> | |
<div class="content"> | |
<div class="container"> | |
<div class="about"> | |
<div class="row"> | |
<div class="span6"> | |
<div class="about_image"> | |
<img src="http://s3.landmoda.com/multimedia/{{ model.identificator }}/book/{{ book.multimedias.first.name }}" alt=""> | |
</div> | |
</div> |
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
<div id="bio"> | |
<p><strong>{{ model.name }}</strong></p> | |
<br> | |
<div class="content"> | |
{{ model.aboutme }} | |
</div> | |
</div> |
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
#!/usr/bin/perl | |
# Quick script to convert a video file to a GIF based on time indicators. | |
# Inspired by the ugly Bash script at http://www.davidgouveia.net/2011/09/how-to-convert-video-to-animated-gifs-from-a-linux-console/ | |
# See `vid2gif --help` for more info. | |
use strict; | |
use warnings; | |
use diagnostics; # useful for debugging; | |
use feature 'say'; # beats print; | |
use Getopt::Long; # for parsing command-line options; | |
use File::Temp; # for tempdirs to store scratch files; |
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
date = Time.now | |
start_date = Time.new(date.year, date.month, 1) | |
end_date = start_date + 1.month |
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
# We generate a basic project | |
say | |
dev = yes?("Are you using padrino-dev?").present? | |
tiny = yes?("Do you need a tiny structure?").present? | |
adapter = ask("SQL adapter for ActiveRecord (sqlite, mysql, postgres, none):") | |
project :test => :none, :renderer => :haml, :script => :jquery, :orm => :activerecord, :dev => dev, :tiny => tiny, :adapter => adapter | |
say "=> Installing exception notifier", :magenta | |
execute_runner :plugin, :exception_notifier |
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
gem 'passenger', '>= 4.0.16' |
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
source 'http://rubygems.org' | |
ruby "1.9.3" | |
gem 'httparty' | |
gem 'clockwork' | |
gem 'foreman' |
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
#agregar | |
gem 'unicorn' |
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
################################################################# | |
# | |
# File: lib/api.rb | |
# | |
################################################################# | |
require 'user' # ActiveRecord model | |
# Connect to the db | |
ActiveRecord::Base.establish_connection(ENV['DATABASE_URL']) |
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 perfectUsername(string) | |
string = string.tr(' ','-') | |
string = string.tr('áàäâªÁÀÂÄéèëêÉÈÊËíìïîÍÌÏÎóòöôÓÒÖÔ','aaaaaAAAAeeeeEEEEiiiiIIIIooooOOOOúùüûÚÙÛÜuuuuUUUUñÑçÇnNcC') | |
string = string.gsub(/[^0-9A-Za-z]/, '') | |
end |