Skip to content

Instantly share code, notes, and snippets.

View waustin's full-sized avatar
🌯

Wade Austin waustin

🌯
View GitHub Profile
@alxgmpr
alxgmpr / dropbox-to-shopify.md
Created May 9, 2019 21:39
Finding the true Dropbox location of images, so that they can be uploaded directly to Shopify.

One of the projects I'm working on right now requires being able to upload product images to Shopify. These images are sourced via Dropbox links, which look something like this: https://www.dropbox.com/s/[some id]/[filename].jpg?dl=0.

Shopify has a feature which allows for API image uploads via URL or via a Base64 encoded attachment. However, when you try and link a Dropbox URL, you will likely encounter an error since Dropbox file extensions are "faux", and aren't the actual location of the image you want.

Searching for a solution to this yeilds little help. The common solution from Shopify indicates that you'd have to download the images via your URL (to do this you must pass ?dl=1), and either encode it to base64 or host it somewhere on your own, then attach the image to your API request.

@waustin
waustin / gist:5586478
Created May 15, 2013 19:09
Boilerplate HTML Lorem Ipsum Page Copy
<h2>Nullam quis risus eget urna mollis ornare vel eu le - H2</h2>
<p><strong>Pellentesque habitant morbi tristique</strong> senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. <em>Aenean ultricies mi vitae est.</em> Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. <a href="#">Donec non enim</a> in turpis pulvinar facilisis. Ut felis.</p>
<h3>Donec ullamcorper nulla non metus auctor fringilla - H3</h3>
<p>Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet r
anonymous
anonymous / mptt_change_list.html
Created January 4, 2013 12:20
django–grappelli and django–mptt workaround. We need to add the 2 mptt templates to grappelli (see files). But since mptt has hardcoded paddings defined with Python, this will never look like it should (and it´s the reason we currently don´t support mptt). See https://github.com/sehmaschine/django-grappelli/issues/243
{% extends "admin/change_list.html" %}
{% load admin_list i18n mptt_admin %}
{% block result_list %}
{% mptt_result_list cl %}
{% endblock %}
@dmukhg
dmukhg / bootstrap.py
Created August 1, 2012 19:58
Bootstrapping script for django web-applications using 12 Factor principles http://dmulog.in/2012/08/01/12factor-django.html
#!/usr/bin/env python
"""
- Create a virtualenv in the directory containing this file.
- Activate the above virtualenv
- Install the dependencies for the app, as declared in
requirements.txt
"""
import os
@kevinSuttle
kevinSuttle / meta-tags.md
Last active May 12, 2024 15:28 — forked from lancejpollard/meta-tags.md
List of Usable HTML Meta and Link Tags
@allanlei
allanlei / .env
Created January 16, 2012 21:14
Sample local Heroku/Django development environment using foreman
DATABASE_URL=postgres://USERNAME:PASSWORD@127.0.0.1/DATABASE
MEMCACHE_SERVERS=127.0.0.1:11211
DJANGO_SETTINGS_MODULE=settings.development.local