Skip to content

Instantly share code, notes, and snippets.

View kathangeorg's full-sized avatar

Schorsch kathangeorg

View GitHub Profile
@kathangeorg
kathangeorg / gist:2780674
Created May 24, 2012 10:15
TYPO3 define link target
PAGE_TARGET =
content.pageFrameObj =
styles.content {
links {
extTarget =
target =
}
loginform.target =
mailform.target =
searchresult {
@kathangeorg
kathangeorg / html.html
Created May 21, 2012 07:55
Fullscreen Background (CSS) All Browsers
<!--[if lte IE 8]>
<link rel="stylesheet" type="text/css" href="path/to/css/ie6-8.css" media="all">
<![endif]-->
<!--[if gt IE 8]>
<link rel="stylesheet" type="text/css" href="path/to/css/modernAndMobileBrowsers.css" media="all">
<![endif]-->
<!--[if !IE]> -->
<link rel="stylesheet" type="text/css" href="path/to/css/modernAndMobileBrowsers.css" media="all">
<!-- <![endif]-->
@kathangeorg
kathangeorg / gist:2758646
Created May 20, 2012 16:16
bash - convert to utf-8
local tmp=$(mktemp)
local charset="$(file -bi "$inputfile"|awk -F "=" '{print $2}')"
if [ "$charset" != "utf-8" ]; then
iconv -f "$charset" -t utf8 "$inputfile" -o $tmp
mv "$tmp" "$inputfile"
fi
@kathangeorg
kathangeorg / curl.php
Created May 15, 2012 07:47
Google Maps CURL
function fetchURL($url) {
//$dateien = file ('http://www.example.com/');
//return implode("",$dateien);
//Initialize the Curl session
$ch = curl_init();
//Set curl to return the data instead of printing it to the browser.
@kathangeorg
kathangeorg / bugfix.php
Created May 14, 2012 07:46
Google Maps API bei 1und1 (BUGFIX)
/**
* generate an array of params for a new marker icon image
* iconShadowImage is optional
* If anchor coords are not supplied, we use the center point of the image by default.
* Can be called statically. For private use by addMarkerIcon() and setMarkerIcon()
*
* @param string $iconImage URL to icon image
* @param string $iconShadowImage URL to shadow image
* @param string $iconAnchorX X coordinate for icon anchor point
* @param string $iconAnchorY Y coordinate for icon anchor point
@kathangeorg
kathangeorg / gist:2651727
Created May 10, 2012 07:40
.htaccess reditect non www to www
#non www to www
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
#www to non www
RewriteEngine On
RewriteCond %{HTTP_HOST} !^my-domain\.com$ [NC]
RewriteRule ^(.*)$ http://my-domain.com/$1 [R=301,L]
#http://dense13.com/blog/2008/02/27/redirecting-non-www-to-www-with-htaccess/
@kathangeorg
kathangeorg / gist:2644457
Created May 9, 2012 13:23
TYPO3 Powermail Checkboxen Werte versenden
#in die Konstanten eintragen
plugin.powermail.field.checkboxJS = 0
@kathangeorg
kathangeorg / ts.ts
Created May 2, 2012 14:08
Typo3 TypoScript Variablen wie page : uid auslesen
temp.typo3Variable = COA
temp.typo3Variable {
5 = TEXT
5 {
# Datum
insertData = 1
data = date : d-m-y
wrap = <p> Das Datum heute: | </p>
}
@kathangeorg
kathangeorg / typo3.ts
Created April 25, 2012 06:42
Fullscreen Background Galery (Backstretch)
page.includeJSFooter.file23456 = fileadmin/templates/js/backstretch/jquery.backstretch.min.js
page.includeJS.file002 >
page.jsFooterInline {
10 = COA
10.10 = CONTENT
10.10.wrap = var images = [ | ];
10.10 {
table = tt_content
?><?php
$defaultPath = "videos/"; // Verzeichnis im Upload-Ordner mit abschliessendem "/". Bsp.: "ordner1/ordner11/"
$defaultImage = "standard.jpg"; //Name des anzuzeigenden Standardbildes
#Default settings Vorschaubild
$img_width = 300;
$img_height = 300;