Skip to content

Instantly share code, notes, and snippets.

@octave
octave / facebook_data_feed_controller.rb
Created November 22, 2018 02:07
Basic Facebook CSV Product Feed Support for Solidus
class FacebookDataFeedController < ApplicationController
def export
@products = Spree::Product.available
respond_to do |format|
format.csv { send_data @products.to_fb_csv, filename: "facebook-data-feed.csv" }
end
@octave
octave / gist:4960515
Last active December 13, 2015 19:08 — forked from anonymous/gist:4960116
Prepare SublimeVideo on button click.
<html>
<head>
<script type='text/javascript' src='http://code.jquery.com/jquery-1.9.1.min.js'></script>
<script type='text/javascript' src='//cdn.sublimevideo.net/js/wkc49gq2-beta.js'></script>
<script type='text/javascript'>
sublime.load();
sublime.ready(function(){
$('#load_video').click(function(e){
sublime.prepare("video1", function(player) {
// player is now ready.
@octave
octave / gist:2952954
Created June 19, 2012 08:13
One pixel border around a video tag
<div id="border_wrap">
<video width="640" height="360"></video>
</div>
<style>
#border_wrap {
width:640px; /* Same width than the video tag */
height:360px; /* Same height than the video tag */
padding:2px; /* If you want a 1px border add a padding of 2px, 2px border / 4px padding, etc */
background-color:red; /* Change the color you want for the border here */