Skip to content

Instantly share code, notes, and snippets.

View Gerhard-Kanzler's full-sized avatar

Gerhard Kanzler Gerhard-Kanzler

View GitHub Profile
@putzflorian
putzflorian / httpsredirect.php
Last active August 29, 2015 13:57
HTTPS umleitung Action Controller
<?php
$document_path = $this->_request->getPathInfo();
if(!Pimcore_Tool::isFrontentRequestByAdmin()){
$pos = strpos($document_path, '/' . $this->language . '/tosc4');
if($pos === false && $_SERVER['SERVER_PORT'] == 443){
Pimcore_Model_Cache::disable();
$this->_redirect('http://www.domain.at' . $document_path, array('code' => 301));
}
@putzflorian
putzflorian / ElementsHeadMeta.php
Last active December 19, 2015 14:59
SEO Meta Helper
<?php
class Website_View_Helper_ElementsHeadMeta extends Zend_View_Helper_Placeholder_Container_Standalone
{
private $built;
public function elementsHeadMeta()
{
return $this;
}
@putzflorian
putzflorian / Datepicker.js
Last active December 16, 2015 01:29
Embed the jquery ui datepicker
var monthnames = [];
var daynames = [];
var dateFormat = 'dd.mm.yy';
var nextprev = [];
switch(lang) {
case "de":
monthnames = ['Januar','Februar','März','April','Mai','Juni','Juli','August','September','Oktober','November','Dezember'];
daynames = ['So','Mo','Di','Mi','Do','Fr','Sa'];
@putzflorian
putzflorian / Retina.php
Created April 9, 2013 08:14
Ein kleiner Helper für das einfügen von Retina Images. Bei den Thumbnails ein weiteres Thumbnail anlegen wo am Ende "_2x" angehängt wird. z.b. Das normale Thumbnail hat den Namen "teaserImage" lautet der Name vom Retina Image "teaserImage_2x".
public static function getRetinaImage($image, $thumbnail){
if($image instanceof Document_Tag_Image){
$myfile = $image->image;
} else if($image instanceof Asset_Image){
$myfile = $image;
} else {
return false;
exit;
}
$end = explode('.', $myfile->getFilename());
@grigs
grigs / browserdetect.js
Created March 13, 2012 17:12
Apple's Browser Detection Script - prettified from http://images.apple.com/global/scripts/browserdetect.js
if (typeof (AC) === "undefined") {
AC = {}
}
AC.Detector = {
getAgent: function () {
return navigator.userAgent.toLowerCase()
},
isMac: function (c) {
var d = c || this.getAgent();
return !!d.match(/mac/i)
@bebraw
bebraw / gameengines.md
Created January 6, 2011 18:07
List of JS game engines. You can find a wikified version at https://github.com/bebraw/jswiki/wiki/Game-Engines. Feel free to modify that. I sync it here every once in a while.

IMPORTANT! Remember to check out the wiki page at https://github.com/bebraw/jswiki/wiki/Game-Engines for the most up to date version. There's also a "notes" column in the table but it simply does not fit there... Check out the raw version to see it.

This table contains primarily HTML5 based game engines and frameworks. You might also want to check out the [[Feature Matrix|Game-Engine-Feature-Matrix]], [[Game Resources]] and [[Scene Graphs]].

Name Size (KB) License Type Unit Tests Docs Repository Notes
Akihabara 453 GPL2, MIT Classic Repro no API github Intended for making classic arcade-style games in JS+HTML5
AllBinary Platform Platform Dependent AllBinary 2D/2.5D/3D n