Skip to content

Instantly share code, notes, and snippets.

View codesprint's full-sized avatar

a.ostermeyr codesprint

View GitHub Profile
@codesprint
codesprint / javascript check if URL has a querystring
Created December 8, 2014 11:02
javascript check if URL has a querystring
if(location.href.indexOf('?') == -1) {
alert('no querystring');
} else {
alert('querystring');
}
@codesprint
codesprint / drupal_teaserlength
Last active August 29, 2015 14:17
Drupal Teaserlänge
100 => t('100 characters'),
@codesprint
codesprint / alinks with special characters
Created March 13, 2015 10:07
Alinks with special characters
@codesprint
codesprint / Drupal empty sitemap
Created March 13, 2015 10:19
Drupal empty sitemap
<?php
module_invoke_all('xmlsitemap_links');
?>
@codesprint
codesprint / Magento Frontpage
Created March 13, 2015 10:22
Magento Frontpage
{{block type="catalog/product_list" category_id="2" template="catalog/product/list.phtml"}}
@codesprint
codesprint / 1
Created March 13, 2015 10:23
.htaccess RewriteRule with special characters
RewriteRule ^schl(xC3xBC)sselanh(xC3xA4)nger(.*)$ http://www.neuedomain.de/schluesselanhaenger.html [L,R=301]
@codesprint
codesprint / HTML 5 Overview
Created March 13, 2015 10:24
HTML 5 Overview
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
@codesprint
codesprint / FCKEditor and Wort
Created March 13, 2015 10:25
FCKEditor and Wort
FCKConfig.AutoDetectPasteFromWord = true;
FCKConfig.CleanWordKeepsStructure = false;
FCKConfig.ForcePasteAsPlainText = true;
@codesprint
codesprint / 1
Last active August 29, 2015 14:17
betterAmazonAPI Examples
<table>
<tbody>
<tr>
<td><a href="[Link]" rel="nofollow"><img title="[Title]" src="[Image-Medium]" alt="[Title]" /></a></td>
<td><a href="[Link]" rel="nofollow">[Title]</a></td>
</tr>
</tbody>
</table>
@codesprint
codesprint / 1
Created March 13, 2015 10:30
Magento: An Error occured while saving the URL rewrite
try {
$this->_getWriteAdapter()->insert($this->getMainTable(), $rewriteData);
}
catch (Exception $e) {
Mage::throwException(Mage::helper('catalog')->__('An error occurred while saving the URL rewrite.'));
}