Skip to content

Instantly share code, notes, and snippets.

View kathangeorg's full-sized avatar

Schorsch kathangeorg

View GitHub Profile
@kathangeorg
kathangeorg / mimetype
Created March 20, 2012 17:24
HTML5 Video Mimetypes per .htaccess
AddType video/ogg .ogm
AddType video/ogg .ogv
AddType video/ogg .ogg
AddType video/webm .webm
AddType audio/webm .weba
AddType video/mp4 .mp4
AddType video/x-m4v .m4v
@kathangeorg
kathangeorg / gist:2145704
Created March 21, 2012 09:00
iOS, Android detection and position fixed
var ua = navigator.userAgent;
var checker = {
iphone: ua.match(/(iPhone|iPod|iPad)/),
blackberry: ua.match(/BlackBerry/),
android: ua.match(/Android/)
};
/*Check if device runs iOS 5 or higher*/
fiveorhigher = navigator.userAgent.match(/[5-9]_[0-9]/) !== null;
if(console) {console.log(fiveorhigher);}
@kathangeorg
kathangeorg / gist:2146326
Created March 21, 2012 11:33
Flexslider order
// sort flexslider correctly
$(document).ready(function(){
var z = 999;
$("ul.slides li").each(function(){
z-=1;
$(this).css({'z-index':z});
});
$('.flexslider').flexslider({
slideToStart: 0,
animation: "fade"
@kathangeorg
kathangeorg / gist:2203950
Created March 26, 2012 08:41
str_replace Javascript
function str_replace(search, replace, subject) {
return subject.split(search).join(replace);
}
@kathangeorg
kathangeorg / gist:2225283
Created March 28, 2012 10:31
Fancybox title multi-line
//Title Format
function str_replace(search, replace, subject) {
return subject.split(search).join(replace);
}
function formatTitle(title, currentArray, currentIndex, currentOpts) {
return '<div id="ttt">'+str_replace("|", "<br>", title)+'</div>';
}
@kathangeorg
kathangeorg / gist:2225287
Created March 28, 2012 10:33
Add Class to Element x
//x=1
jQuery('.block-inner.box.platte_200x280 a.download:eq(1)').addClass("view");
@kathangeorg
kathangeorg / gist:2225375
Created March 28, 2012 10:51
Typo3 Multi Domain BASE URL
//TypoScript
# Multi Domain Configuration
[globalString = ENV:HTTP_HOST=example1.de]
config.baseURL = http:// www.example1.de/
[global]
[globalString = ENV:HTTP_HOST=www.example2.de]
config.baseURL = http:// www.example2.de/
[global]
  • test
<?php
/*
** @Title: Recaptcha Validation
** @Date Modified: 6/01/09
** Instructions: Place this code in a file called "ajax.recaptcha.php"
*/
//A. Load the Recaptcha Libary
require_once('/location/to/recaptchalib.php');
@kathangeorg
kathangeorg / 10_fullscreen_background.html
Created April 13, 2012 06:42
Fullscreen Background (jQuery)
<div class="bgh">
<img src="path/to/image.jpg"/>
</div>