Skip to content

Instantly share code, notes, and snippets.

-------------------------------------
Advanced Web Ranking Installation
-------------------------------------
[1] Basic (Advanced Web Ranking and Advanced Link Manager)
[2] Basic + Advanced Web Ranking Server
[3] Basic + Advanced Link Manager Server
[4] Complete
=======================
Enter your menu choice [1-4] (default [1])2
Start install
<% if article.is_childless? %>
<li><%= link_to article.title, article_path(article) %></li>
<% else %>
<li class="dropdown">
<%= link_to '#', class: 'dropdown-toggle', data: { toggle: 'dropdown'} do %>
<%= article.title %>
<b class="caret"></b>
<% end %>
<ul class="dropdown-menu">
<%= render partial: 'site/menu', collection: article.children, as: :article %>
@dbarison
dbarison / 0_reuse_code.js
Created August 29, 2014 10:56
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@dbarison
dbarison / gist:62faeaa2fc81ab30a68a
Created October 23, 2014 11:02
Block unicorn from external access
iptables -A INPUT -i lo -p tcp --destination-port 3000:3060 -j ACCEPT
iptables -A INPUT -p tcp --destination-port 3000:3060 -j DROP
### Keybase proof
I hereby claim:
* I am dbarison on github.
* I am davidebarison (https://keybase.io/davidebarison) on keybase.
* I have a public key whose fingerprint is EE94 39E0 C088 A74D 162A 9E71 A0FA C825 F9F0 2C03
To claim this, I am signing this object:
class Product < ActiveRecord::Base
include HasTranslationOrder
has_translation_order :fields => [:name, :excerpt, :description, :seo_title, :seo_desc], :associations => [:content, :variant, :property], :comment_method => :job_comment
end
pt-BR:
routes:
pages: azienda
posts: news
products: prodotti
message: contatti
portfolio: realizzazioni
advantages: vantaggi
company: eternoivica
group: gruppo
en:
fiere: expo
Prodotti correlati: Related products
Selezionando una di queste opzioni visualizzerai sulla mappa i risultati trovati: Selecting one of these options you'll see the results on the map
Specificare professione: Specify job
Abilità prodotti + contenuti:
Abilità solo contenuti:
archivio: archive
Accedi al software per il calcolo supporti: Access to calculation software
'Accedi al software per il calcolo supporti ': Access to calculation software
@dbarison
dbarison / gist:1391050
Created November 24, 2011 10:28
Rails 3.1 application.rb asset pipeline
config.assets.precompile = [
/\.(?!css|js)\w+$/,
/application.(css|js)$/,
/admin.(css|js)$/,
'print.css', 'admin_print.css', 'ie.css', 'admin_ie.css', 'modernizr.js'
]
@dbarison
dbarison / gist:1476750
Created December 14, 2011 14:18
Google analyitics intelligence for ecommerce
- if controller.controller_name == 'orders' && controller.action_name == 'show'
- items = []
- @order.cart.line_items.each do |line_item|
- items << "_gaq.push(['_addItem',
'#{escape_javascript(@order.code)}',
'#{escape_javascript(line_item.product.code)}',
'#{escape_javascript(line_item.name)}',
'#{escape_javascript(line_item.product.category.name)}',
'#{escape_javascript(line_item.selling_price.to_s)}',
'#{escape_javascript(line_item.quantity.to_s)}']);"