This file contains hidden or 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
| @charset "UTF-8"; | |
| /* | |
| * Generales | |
| */ | |
| * { | |
| padding: 0; | |
| margin: 0; | |
| font-family: 'PT Sans', sans-serif; |
This file contains hidden or 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
| <!-- Formulario y botón "agregar al carro" en plantilla product.html. | |
| Los data-attributes son necesarios para la API Ajax del carrito (opcional) --> | |
| <form class="add_to_cart" action="{{ add_to_cart_url }}" method="post" data-bootic-cart-add="add" data-bootic-productId="{{ product.id }}"> | |
| <!-- si hay más de 1 variante, muéstralas en una lista --> | |
| {% if product.variants_count > 1 %} | |
| <h4>{{ 'activerecord.models.variant' | t }}</h4> | |
| <ul class="variants"> | |
| <!-- primero las variantes disponibles --> | |
| {% for variant in product.available_variants %} | |
| <li class="bootic_variant available {% cycle 'odd', 'even' %} av-variant-{{ forloop.index }}"> |
This file contains hidden or 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
| /* Gmail search favelets */ | |
| /* today */ | |
| javascript:(function(){ | |
| document.body.appendChild(document.createElement('script')).src='https://cdnjs.cloudflare.com/ajax/libs/datejs/1.0/date.min.js'; | |
| var s = document.getElementById('gbqfq'), b = document.getElementById('gbqfb'); | |
| s.value = 'in:inbox after:'+Date.today().toString('yyyy/MM/dd')+' before:'+Date.parse('tomorrow').toString('yyyy/MM/dd')+''; | |
| b.click(); | |
| })(); |
This file contains hidden or 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
| <?php | |
| $ch = curl_init(); | |
| curl_setopt($ch, CURLOPT_URL,"https://auth.bootic.net/oauth/token"); | |
| curl_setopt($ch, CURLOPT_USERPWD, "client_id:client_secret"); | |
| curl_setopt($ch, CURLOPT_POST, 1); | |
| curl_setopt($ch, CURLOPT_POSTFIELDS, "grant_type=client_credentials&scope=admin"); | |
| curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
| $server_output = curl_exec ($ch); | |
| curl_close ($ch); | |
| print_r($server_output); |
This file contains hidden or 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 'date' | |
| require 'koala' | |
| class BirthdayLiker | |
| FACEBOOK_TOKEN = 'your_oauth_key' | |
| BIRTHDAY_WORDS = %w(birthday bday birfday birth born) | |
| DATE_TIME_FORMAT = '%Y-%m-%d' | |
| def initialize(birthdate, opts={}) | |
| @api = Koala::Facebook::API.new(FACEBOOK_TOKEN) |
This file contains hidden or 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
| <!-- Formulario y botón "agregar al carro" en plantilla product.html. | |
| Los data-attributes son necesarios para la API Ajax del carrito (opcional) --> | |
| <form class="add_to_cart" action="{{ add_to_cart_url }}" method="post" data-bootic-cart-add="add" data-bootic-productId="{{ product.id }}"> | |
| <!-- si hay más de 1 variante, muéstralas en una lista --> | |
| {% if product.variants_count > 1 %} | |
| <h4>{{ 'activerecord.models.variant' | t }}</h4> | |
| <ul class="variants"> | |
| <!-- primero las variantes disponibles --> | |
| {% for variant in product.available_variants %} | |
| <li class="bootic_variant available {% cycle 'odd', 'even' %} av-variant-{{ forloop.index }}"> |
This file contains hidden or 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/env ruby | |
| # 22.sep.2014 00:27:47 by juque.cl | |
| # how to run: | |
| # ruby gascon.rb | |
| # int to string | |
| puts 34.to_s.inspect # using inspect method just for debugging purposes | |
| # string to int | |
| puts "34".to_i.inspect # using inspect method just for debugging purposes |
This file contains hidden or 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
| <select name="cart_item[variant_id]"> | |
| {% for variant in product.variants %} | |
| <option value="{{ variant.id }}" id="{{ variant.id }}" {% unless variant.is_available %}disabled="disabled"{% endunless %}>{{ variant.title }} {% if variant.is_available != true %} - agotado {% endif %}</option> | |
| {% endfor %} | |
| </select> |
This file contains hidden or 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
| // compra mínima | |
| // ------------- | |
| // Desaparece botón "Comprar", a no ser que | |
| // se cumpla con la condición de tener X productos. | |
| // Este script requiere bootic_cart | |
| // {{ 'http://js.bootic.net/cart/0.0/bootic_cart.min.js' | javascript_tag }} | |
| // Para cambiar el mínimo solo cambie el siguiente valor | |
| var compraMinima = 4; |
OlderNewer