Skip to content

Instantly share code, notes, and snippets.

WARNING 2013-09-12 23:08:10,279 indexing._index 50570 1 failed to index url: https://staging.archetypes.com/shop/call-shots-iphone-5-case
WARNING 2013-09-12 23:08:13,537 indexing._index 50570 1 failed to index url: https://dev-web11.archetypes.com/shop/dkny-pure-enchantment-duvet-cover
WARNING 2013-09-12 23:08:17,783 indexing._index 50570 1 failed to index url: https://dev-web11.archetypes.com/shop/tracy-porter-poetic-wanderlust-ardienne-quilt
WARNING 2013-09-12 23:08:25,041 indexing._index 45512 1 failed to index url: https://dev-web11.archetypes.com/admin/commerce/products/8873/edit?destination=node/40137
WARNING 2013-09-12 23:08:34,546 indexing._index 50570 1 failed to index url: https://dev-web11.archetypes.com/admin/structure/nodequeue/7/view/167
WARNING 2013-09-12 23:08:37,814 indexing._index 50570 1 failed to index url: https://dev-web11.archetypes.com/shop/lyrics-equa-hand-towel-om
WARNING 2013-09-12 23:08:41,705 indexing._index 50570 1 failed to
@hcliff
hcliff / urls.py
Created September 18, 2013 14:45
Example dev media serving
from django.conf import settings
# Create your urlpatterns here
if settings.DEBUG:
urlpatterns = patterns('django.views.static',
(r'^%s/(?P<path>.*)$' % settings.MEDIA_URL.strip('/'), 'serve',
{'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
(r'^%s/(?P<path>.*)$' % settings.DEV_MEDIA_URL.strip('/'), 'serve',
{'document_root': settings.GENERATED_MEDIA_DIR, 'show_indexes': True}),
@hcliff
hcliff / settings.py
Created September 18, 2013 14:49
Example settings
PROJECT_ROOT = '' # path to project goes here
# Uncompiled static
# Absolute filesystem path to the directory that will hold site static assets
STATIC_ROOT = os.path.join(PROJECT_ROOT, 's/s')
# Staticfiles app settings, files to copy to static location
STATICFILES_DIRS = ()
STATIC_URL = '/s/s/'
@hcliff
hcliff / spling.html
Last active December 23, 2015 09:39
Example code for archetype of indexing code via an ajax get
<script type='text/javascript'>
$(function(){
$.ajax({
url: '//archetype.spling.com/api/2/indexing/',
dataType: 'json',
timeout: 200,
data: {},
error: function(){}
});
});
@hcliff
hcliff / readme.md
Last active December 26, 2015 06:59
Spling quickstart

Spling quick reference

Stack

  • Spling is built with Backbone 0.9.1, the docs are http://backbonejs.org/
  • Spling is written with coffeescript (compiled to js on deploy).
  • Templates are written in eco (compiled to js on deploy).
  • Stylesheets are written in less (compiled on deploy).

The views (archetype edition)

There are two views you'll be interested in overriding

@hcliff
hcliff / gist:7723327
Created November 30, 2013 19:20
quick json dump
var json = JSON.parse(document.getElementsByTagName('pre')[0].innerHTML)
Beauty - Outer Beauty
- Face Haus offers no-frills facials for those on the go
- The Spring Skin Detox: How To Rejuvenate Your Skin
- Chapped No More: 8 Must-Have Winter-Friendly Skin and Hair Soothers
- Step-by-Step Guide: How to Brew Kombucha – Kombucha for Beauty
- Rainbow Detox Smoothie
- 20 toxic ingredients to avoid when buying body care products and cosmetics
- Review: Josie Maran cosmetics
- Meet A D.C. Entrepreneur With A Passion For Beauty
- Swatches of all The All Natural Face powder blushes
function finder(filename, string){
for(var ifilename = 0, istring = 0;ifilename<filename.length;ifilename++){
var cstring = string[istring],
cfilename = filename[ifilename];
// console.log(i, cstring, cfilename);
if(cstring == cfilename){
istring++;
if(istring == string.length)
Before
[negroni] Started GET /browse
2015/06/10 15:09:25 Memstats param parsing alloc: 704B totalalloc: 704B sys: 0 pause: 0ms numGc: 0, heapAlloc: 704B heapSys: -16K heapObjects: 15 heapInuse: 0 elapsed: 169.577µs
2015/06/10 15:09:25 Memstats s2-covering alloc: 16.6K totalalloc: 16.6K sys: 0 pause: 0ms numGc: 0, heapAlloc: 16.6K heapSys: 0 heapObjects: 147 heapInuse: 16K elapsed: 294.735µs
2015/06/10 15:09:25 Memstats create-venue-event-query alloc: 192B totalalloc: 192B sys: 0 pause: 0ms numGc: 0, heapAlloc: 192B heapSys: 0 heapObjects: 2 heapInuse: 0 elapsed: 16.89µs
gc10(1): 1+0+1024+1 us, 1 -> 2 MB, 25383 (46628-21245) objects, 15 goroutines, 239/0/0 sweeps, 0(0) handoff, 0(0) steal, 0/0/0 yields
gc11(1): 1+0+1282+2 us, 1 -> 3 MB, 45529 (106116-60587) objects, 15 goroutines, 3