Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| #!/usr/bin/env python | |
| import argparse | |
| import redis | |
| def connect_redis(conn_dict): | |
| conn = redis.StrictRedis(host=conn_dict['host'], | |
| port=conn_dict['port'], | |
| db=conn_dict['db']) | |
| return conn |
| 'use strict'; | |
| function supportsHtml5Storage() { | |
| try { | |
| //jscs:disable | |
| return 'localStorage' in window && window['localStorage'] !== null; // jshint ignore:line | |
| //jscs:enable | |
| } catch (e) { | |
| return false; | |
| } |
| t = { | |
| initTooltip: function() { | |
| var $tooltipsCircles = $('.js-tooltip-circles'); | |
| $tooltipsCircles.tooltip({ | |
| show: 'fold', | |
| position: { | |
| my: 'center bottom-20', | |
| at: 'center top', | |
| using: function(position, feedback) { |
| 'use strict'; | |
| (function ($) { | |
| var $body, | |
| $window, | |
| backToTop = { | |
| init: function () { | |
| this.$backToTop = $('#back-top'); | |
| this.$header = $('#header'); | |
| this.$footer = $('#footer'); |
| /* wday-banner start */ | |
| .wday-banner { | |
| &__i { | |
| &:extend(.clearfix all); | |
| margin-top: -5.9rem; | |
| background-image: url(../../img/wday/bg-banner.png); | |
| background-repeat: no-repeat; | |
| background-position: top center; | |
| background-size: cover; |
| /** | |
| * Swipe | |
| */ | |
| document.addEventListener('touchstart', handleTouchStart, false); | |
| document.addEventListener('touchmove', handleTouchMove, false); | |
| var xDown = null; | |
| var yDown = null; | |
| function handleTouchStart(ev) { |
| ;(function ($) { | |
| 'use strict'; | |
| $.fn.dontScrollParent = function(options) { | |
| options = $.extend({ | |
| // defaults | |
| wheelstop: null // Function | |
| }, options); | |
| // Compatibilities |
| var $userBasketDropdown = jQuery('.user-basket .dropdown'), | |
| $userBasketContent = jQuery('.user-basket .dropdown-menu'); | |
| $userBasketDropdown.addClass('open'); | |
| function mouseWheelMiniCartHandler(ev) { | |
| var height = $userBasketContent.height(), | |
| scrollHeight = $userBasketContent.get(0).scrollHeight, | |
| st = $userBasketContent.scrollTop(), | |
| wheelDelta = ev.originalEvent.wheelDelta; |