This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from urllib import quote | |
from string import ascii_lowercase | |
from operator import itemgetter | |
import os | |
import random | |
import requests | |
from datetime import datetime | |
from lib.languages import LANGUAGES, get_language_by_name | |
from lib.utils import format_timedelta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib, json, operator, webbrowser, uuid | |
class gBasePriceReport(): | |
""" | |
To Run Competition check leave keywords as None | |
To Run A Report to find pricing we don't have, leave store_name=None | |
and add keywords as a list of words expected[i.e. primeline, andersen, window] | |
""" | |
def __init__(self, api_key, store_name=None, keywords=None, sku_file=None): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import MySQLdb | |
import MySQLdb.cursors | |
class zenMySql(): | |
def __init__(self, host, user, password, db): | |
self.host = host | |
self.user = user | |
self.passwd = password | |
self.db = db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($){ | |
$.fn.topButton = function(){ | |
return this.each(function(index){ | |
$(this).click(function(e){ | |
$('html, body').animate({scrollTop: 0}, 'slow'); | |
}); | |
}); | |
} | |
})(jQuery); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Implements hook_theme_registry_alter() | |
* Loads templates from the tpl folder of this module into theme registry | |
*/ | |
function MODULENAME_theme_registry_alter(&$registry){ | |
$path = drupal_get_path('module', 'MODULENAME').'/tpl'; | |
$current_theme = variable_get('theme_default','none'); | |
_theme_process_registry($registry, 'phptemplate', 'theme_engine', $current_theme, $path); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() { | |
var ua = navigator.userAgent.toLowerCase(), | |
isAndroid = ua.indexOf("android") > -1, | |
isiPhone = /iphone/i.test(ua), | |
positionSlides = function(){ | |
$('.slides').css({ | |
'margin-top': '20px' | |
}); | |
}, | |
resizeSlideText = function(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#edit-next').click(function(){ | |
//TODO: Check that image is selected before proceeding | |
var actionA = $('.node-photo-form').attr('action').split('?'), | |
apiImage = $('.selected-photo img').attr('data-photo-url'); | |
if(apiImage){ | |
if($('#edit-field-photo input[value="Remove"]').length){ | |
return true; | |
}else{ | |
$('.node-photo-form').attr('action',actionA[0]) | |
$('.filefield-source-remote').triggerHandler('click'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($){ | |
$.fn.myFunction = function(){ | |
return this.each(function(i, obj){ | |
var $this = $(obj); | |
}); | |
} | |
})(jQuery); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.fb-album').hover( | |
function () { | |
pf_data.fb_list_hover = false; | |
$('.album-list').show(); | |
$('.album-list').hover( | |
function () { | |
pf_data.fb_list_hover = true; | |
$('.album-list').show(); | |
/*$('.album-list li').click(function () { |