[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
[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
| 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: |
| !.*/(\.[^/]*|coverage|tmp|CVS|_darcs|_MTN|\{arch\}|blib|.*~\.nib|.*\.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle))$ |
| 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 |
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:
| # 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] |
| 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 |
| ... | |
| 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 | |
| ... |