Skip to content

Instantly share code, notes, and snippets.

<script src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
<script>
var getQueryVariable = function(variable)
{
var query = window.location.search.substring(1);
var vars = query.split("&");
@BigWillie
BigWillie / hotukdeals.html
Created September 17, 2015 15:22
Hot UK Deals share button
<a class="hukd-share-button"
href="http://www.hotukdeals.com/social/share?
title=Nike%20Roshe%20Run&amp;
url=http%3A%2F%2Fwww.jdsports.co.uk%2Fproduct%2FNike-roshe-run%2F120255%2F&amp;
image=http%3A%2F%2Fjdsports.scene7.com%2Fis%2Fimage%2FJDSports%2FJD-master-template%3F%24plu%3D120255a%26wid%3D175%26hei%3D175%26resmode%3Dsharp%26op_usm%3D1.1%2C0.5%2C0%2C0&amp;price=55&amp;
style=horizontal" target="_blank">
<img src="https://sb.monetate.net/img/1/322/135237.png" title="Share with HUKD" alt="Share with HUKD"></a>
var fs = require('fs');
var parse = require('csv-parse');
var _ = require('lodash');
var needle = require('needle');
// First you need to create a private app in shopify.
// From this - you'll get a load of secret stuff, an API key and a password
var shopname = 'foo'; // eg: foo.myshopify.com
var secretStuff = 'API-KEY-GOES-HERE:PASSWORD-GOES-IN-HERE';
@BigWillie
BigWillie / gist:6393759
Last active December 22, 2015 01:08
Dream code for video conversion
convertVideo('videoFilename.mp4').to( {
filename: 'newVideoFilename.3gp'
service: 'Amazon Elastic Transcoder',
frameRate :"auto",
resolution :"auto",
aspectRatio :"16:9",
interlaced : false,
compression: '90%'
} ).save();
@BigWillie
BigWillie / RobsFizzBuzzBoom.js
Last active October 13, 2015 16:07
Fizz buzz boom! - Robs fizz buzz answer
// Robs Fizz Buzz with a boom!... with long winded if statements :)
// Try it here: http://eloquentjavascript.net/paper.html
var f = "Fizz",
b = "Buzz";
for (i = 1; i <= 101; i++)
{
if (i%3 == 0 && i%5 == 0) {
console.log(f + b);