-
Preferencias del sistema (Dock, Seguridad, Economizador, Ratón, Compartir...)
-
Navegadores
-
Firefox (Copy as HTML Link, Firebug, Font Finder, PageSpeed Insights, SearchStatus, Web Developer, YSlow, ¿FireSass, Google Translator?) + preferencias
-
Chrome ya importa extensiones y preferencias si te logueas (Alexa Traffic Rank, Capturador de Páginas Web, Create Link, Firebug Lite, Pendule, Power Twitter, Resolution Test, SEO Status)
-
Editores:
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 decorate_resource_or_collection(item_or_items) | |
klass = item_or_items.is_a?(Array) ? item_or_items.first.class.to_s : item_or_items.class.to_s | |
(klass + "Decorator").constantize.decorate(item_or_items) | |
rescue NameError | |
item_or_items | |
end | |
... |
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
require 'spreadsheet' | |
include Spreadsheet | |
format.xls do | |
# ------ El bloque XLS debe ir sin paginación y con producto ------ # | |
fichero = "vila_#{@modo}_#{Time.now.to_f.to_s}.xls" | |
ruta = "#{Rails.root}/tmp/#{fichero}" | |
Spreadsheet.client_encoding = "UTF-8" | |
workbook = Spreadsheet::Workbook.new |
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
# Si tengo que acceder a la provincia en un bucle de 10.000 iteraciones, es poco eficiente hacer | |
Provincia.nombre(rest.provincia_id) | |
# En vez de eso, me creo un hash de provincias: {1=>"Álava/Araba", 2=>"Albacete", 3=>"Alicante",...} | |
provincias = {} | |
Provincia.select('id, nombre').each{ |p| provincias.merge!({ p.id => p.nombre }) } | |
# Y ya puedo acceder directamente sin llamar a nadie más: | |
provincias[rest.provincia_id] |
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
describe "dominios de sudamérica" do | |
it "rankia.cl se redirige a www.rankia.cl" do | |
get portada_foros_url(host: 'rankia.cl') | |
response.should redirect_to(portada_foros_url(host: 'www.rankia.cl')) | |
end | |
end |
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
!.*/(\.[^/]*|coverage|tmp|CVS|_darcs|_MTN|\{arch\}|blib|.*~\.nib|.*\.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle))$ |
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
Initial ugly version: | |
- if @post | |
%div{ class: "blog-titulo#{ ' peque' if @blog.titulo.length > 60 }" }= @blog.titulo | |
- else | |
%h1{ class: "blog-titulo#{ ' peque' if @blog.titulo.length > 60 }" }= @blog.titulo | |
Nice, but doesn't work: |
[FIX] something is wrong and you have to fix it if ypu want your branch to be merged
[TIP] doing this in this way might be better
[DISC] brain fapping about something
[GP] good practices, is not wrong but if you dont fix it you will be whipped
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
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
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
scp deploy@db.rankia.com:/db/mysql/log/slow_query.log ~/Downloads | |
ruby ~/SlowQueryLogParser.rb ~/Downloads/slow_query.log number > ~/Downloads/slow_query_formatted.log | |
mate ~/Downloads/slow_query_formatted.log |
OlderNewer