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( libFileName ) { | |
var scripts = document.getElementsByTagName( 'script' ), | |
i, src, parts, len = scripts.length; | |
for( i = 0; i < len; i++ ) { | |
src = scripts[i].src; | |
if( src.indexOf( libFileName ) != -1 ) { | |
parts = src.split( '?' ); | |
if( parts[1] ) { | |
/* set requiresjs config */ |
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
#!/usr/bin/nodejs | |
var Promise = require( 'promise' ); | |
/** | |
* | |
* @param {Array} list | |
* @param {int} delay | |
*/ | |
function recursivePromiseWithDelay( list, delay ) { |
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
/* The slide mixin. | |
* | |
* It makes use of Twitter Bootstrap mixins, but those | |
* are mostly in use for browser compatibility and could | |
* be rewritten without a TB dependency. | |
*/ | |
.slide(@distance: 100%, @direction: right) { | |
.transition-transform( ~"500ms ease-out" ); |
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
<style> | |
dl.tabs { | |
position: relative; | |
width: 50%; | |
} | |
dl.tabs dt { | |
display: inline-block; | |
cursor: pointer; | |
border-bottom: 1px dashed transparent; | |
transition: border-bottom-color .5s linear; |
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
SELECT `COL1`, `COL2`, `COL3`, `COL4` | |
FROM `TABLENAME` | |
INTO OUTFILE '/tmp/export.csv' | |
FIELDS TERMINATED BY ',' | |
ENCLOSED BY '"' | |
LINES TERMINATED BY '\n'; |
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
<form> | |
<label for="test1" data-hover-focus>Test 1</label> | |
<input type="search" id="test1" /><br /> | |
<label for="test2" data-hover-focus>Test 2</label> | |
<input type="search" id="test2" /> | |
</form> | |
<script> | |
var hoverLabels = document.querySelectorAll( 'label[data-hover-focus]' ); | |
for( var i = 0, len = hoverLabels.length; i < len; i++ ) { | |
if( hoverLabels[i].control ) { // make sure this is a label with an assigned input |
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
mbstring.language = Neutral | |
mbstring.internal_encoding = UTF-8 | |
mbstring.func_overload = 7 |
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
-- move Magento to another server | |
SET @shop_domain = 'SOME_VHOST.local.de/', | |
@secure_protocol = 'https://'; -- set to 'http://' if no certificate is available | |
UPDATE `core_config_data` SET `value` = CONCAT('http://', @shop_domain, '/') WHERE `path` = 'web/unsecure/base_url'; | |
UPDATE `core_config_data` SET `value` = CONCAT(@secure_protocol, @shop_domain, '/') WHERE `path` = 'web/secure/base_url'; | |
UPDATE `core_config_data` SET `value` = CONCAT('http://', @shop_domain, '/media/') WHERE `path` = 'web/unsecure/base_media_url'; | |
UPDATE `core_config_data` SET `value` = CONCAT(@secure_protocol, @shop_domain, '/media/') WHERE `path` = 'web/secure/base_media_url'; | |
UPDATE `core_config_data` SET `value` = @shop_domain WHERE `path` = 'web/cookie/cookie_domain'; |
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
<?php | |
/* do this if MIME type is 'application/xhtml+xml' */ | |
ob_start(function ($buffer) { | |
$replacer = array( | |
'/(<script[^<>]*>)([^<>]+)(<\/script>)/' => '$1<![CDATA[ $2 ]]>$3', | |
'/(<style[^<>]*>)([^<>]+)(<\/style>)/' => '$1<![CDATA[ $2 ]]>$3', | |
/* more replaces may follow, like: | |
* replace ampersand-characters, which are not part of an entity or within a CDATA-block |
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
:lang(de), :lang(de-de) { quotes: "\201E" "\201C" "\201A" "\2018"; } | |
:lang(de-fr) { quotes: "\00BB" "\00AB" "\203A" "\2039"; } | |
:lang(de-ch) { quotes: "\00AB" "\00BB" "\2039" "\203A"; } | |
:lang(en) { quotes: "\201C" "\201D" "\2018" "\2019"; } | |
:lang(fr) { quotes: "\00AB\00A0" "\00A0\00BB" "\2039\00A0" "\00A0\203A"; } | |
q:before { content: open-quote; } | |
q:after { content: close-quote; } | |
q q:before { content: open-quote; } | |
q q:after { content: close-quote; } |
NewerOlder