Skip to content

Instantly share code, notes, and snippets.

View ziyan-junaideen's full-sized avatar
👋
How you doing?

Ziyan Junaideen ziyan-junaideen

👋
How you doing?
View GitHub Profile
Deface::Override.new(
virtual_path: "spree/products/_properties",
name: "add_product_properties_container",
surround_contents: "erb[silent]:contains('unless')",
text: "<div id='product-info-container'><%= render_original %></div>"
)
// This styling is for salvatore plugin to work, this is more or less the config of
// the plugin
@media screen and (min-width: 1px) and (max-width: 767px){
#columns[data-columns]::before {
content: '2 .col-xs-6';
}
}
@media screen and (min-width:768px) and (max-width: 991px){
#columns[data-columns]::before {
content: '3 .col-sm-4';
@ziyan-junaideen
ziyan-junaideen / gist:015dfb9a779e39501bfd
Created December 25, 2014 15:29
If you get this issue, remove `Gemfile.lock` and `bundle install` again.
em::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... no
checking for inotify_init() in sys/inotify.h... yes
checking for writev() in sys/uio.h... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_enable_interrupt()... no
checking for rb_time_new()... yes
@ziyan-junaideen
ziyan-junaideen / _config.yml
Last active August 29, 2015 14:12
As part of the post Jekyll Pagination in Non Index Page in http://www.jdeen.com/2014/12/jekyll-pagination-in-non-index-page.html
paginate: 5
paginate_path: blog/page:num
#!/usr/bin/env ruby
# Library includes
require 'moneta'
require "redis"
require "hiredis"
require 'redis-objects'
# Serialization
<div data-columns="4" data-trigger="infinite-scroll" id="columns"><div class="col-lg-3"><div class="product-item panel panel-primary infinite-scroll-item" data-id="f55f0699-1d11-4b3a-b5ed-a7ec7e4b82a3" data-product-item="">
<div class="panel-body product-image-container">
<img class="img-responsive product-image ui-draggable ui-draggable-handle" src="http://tartarus.orpiva.com/image/5eae315524bfe1e1720a05a9f5ad04b402e5b4c0/250x/keep_ratio/cdf6683f-e931-4a4d-bdc0-3f40e4abc069.jpg">
<div class="overlay">
<a data-product-id="f55f0699-1d11-4b3a-b5ed-a7ec7e4b82a3" data-trigger="add-wish" href="#">Wish</a><a href="http://www.awin1.com/pclick.php?p=3111974149&amp;a=190241&amp;m=3100">Buy</a>
</div>
</div>
<div class="panel-footer product-info-container clearfix">
<a class="similar" href="#">Search si
# Reinit infinitescroll
$('[data-trigger="infinite-scroll"]').infinitescroll
navSelector: '.pagination'
nextSelector: '.pagination a:first'
itemSelector: '.infinite-scroll-item'
appendCallback: false
bufferPx: 700
loading:
img: "data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
finishedMsg: "<h4 class='text-center'>You have reached the end of the feed.</h4>",
///! List of columned items
div[data-trigger="infinite-scroll"]
#columns.clearfix[data-columns]
- items_feed.each do |item|
.product-item.panel.panel-primary.infinite-scroll-item.invisible[data-product-item data-id="#{item.uuid}"]
.panel-body.product-image-container
img.img-responsive.product-image src="#{tartarus_product_thumb(item)}"
.overlay
== show_product_wish_link item, 'Wish'
== show_product_buy_link item, 'Buy'
initProductSlider = () ->
$('#products-slider-1').owlCarousel
singleItem: true
return
$(document).ready ->
initProductSlider()
return
/* @fn struct ProductParameters {{{
* @brief Product parameters passed to the function products_(all/deleted/current)_with_params
*
* @params i32 per_page Records count in list
* @params i32 page Records page number
*/
struct ProductParameters {
1: optional i32 per_page;
2: optional i32 page;
3: optional bool include_meta = true;