Skip to content

Instantly share code, notes, and snippets.

View deniszgonjanin's full-sized avatar
😀
🌍

Denis Zgonjanin deniszgonjanin

😀
🌍
  • Hypehound
  • Ottawa, ON, Canada
View GitHub Profile
@deniszgonjanin
deniszgonjanin / flickr-download-set.py
Created February 23, 2012 00:04
#Downloads all the images in a Flickr set, given the set id
#Downloads all the images in a set, given the set id
# you need http://stuvel.eu/flickrapi#installation
import flickrapi
import urllib2
import os
api_key = 'a flickr API key'
#id of set you would like to download
<div class="clearfix" id="product-content" itemscope itemtype="http://schema.org/Product">
<meta itemprop="url" content="{{ shop.url }}{{ product.url }}" />
<meta itemprop="image" content="{{ product.featured_image.src | product_img_url: 'grande' }}" />
{% comment %}The reason why we're removing the form tags when the product is sold out is because we add a 'notify me when product is available' contact form within, and nested forms don't work.{% endcomment %}
{% if product.available %}
<form action="/cart/add" method="post" enctype="multipart/form-data">
{% endif %}
<div id="col-main">
<div id="product" class="clearfix content">
<div id="product-information">
<p id="add-to-cart-msg"></p>
<div id="product-header" class="diagonal-divider clearfix">
<div id="col-main" class="full content">
<div id="page-header">
<h2 id="page-title">Shopping Cart</h2>
</div>
{% if cart.items == empty %}
<p class="empty">Your shopping cart is empty. Check out our <a href="/collections/all">catalog</a> to see what's available.</p>
{% else %}
@deniszgonjanin
deniszgonjanin / pyCanLII.py
Created September 3, 2013 19:58
Thin CanLII API wrapper for python (http://developer.canlii.org/docs)
import urllib, urllib2, json
class CanLIIException(Exception):
def __str__(self):
return repr(self.args)
class CanLII(object):
def __init__(self, api_key, language = 'en'):
self.address = "http://api.canlii.org/v1/"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@deniszgonjanin
deniszgonjanin / Pandas Basics.ipynb
Created December 3, 2013 23:28
Pandas Basics - iPython Notebook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/bin/sh
#
# /etc/init.d/tomcat6 -- startup script for the Tomcat 6 servlet engine
#
# Written by Miquel van Smoorenburg <miquels@cistron.nl>.
# Modified for Debian GNU/Linux by Ian Murdock <imurdock@gnu.ai.mit.edu>.
# Modified for Tomcat by Stefan Gybas <sgybas@debian.org>.
# Modified for Tomcat6 by Thierry Carrez <thierry.carrez@ubuntu.com>.
# Additional improvements by Jason Brittain <jason.brittain@mulesoft.com>.
#
[
{
"domain_content": true,
"domain_data": true,
"domain_software": false,
"family": "",
"id": "CC-BY-4.0",
"maintainer": "Creative Commons",
"od_conformance": "approved",
"is_okd_compliant": false,
@deniszgonjanin
deniszgonjanin / downpay_add_remove_products.md
Created February 8, 2024 23:45
Adding a removing products from Downpay purchase options

Programatically adding and removing products to Downpay purchase options

Using the Downpay API, you can add or remove products to purchase options with a single API call. For inputs, you will need:

  • The id of the purchase option in the app. You can find this ID by editing the relevant purchase option in the app - it is the last part of the URL of the edit page
  • The ids of the Shopify product(s) you'd like to add to the option.

The API is in GraphQL.

Adding a product to a purchase option: