Skip to content

Instantly share code, notes, and snippets.

View kathangeorg's full-sized avatar

Schorsch kathangeorg

View GitHub Profile
@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 / 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: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 / gist:2896532
Created June 8, 2012 16:15
disable link per css (cursor event none)
pointer-events: none;
@kathangeorg
kathangeorg / gist:2935497
Created June 15, 2012 08:54
IE6-8 transparent png fade FIX
//specific image on site
//FIX IE < 9 transparent png fading
var img = $("div.replace.full"+idart+" img");
//console.log(img[0]);
var src = $("div.replace.full"+idart+" img").attr('src');
//console.log(src);
if (src.substr(src.length-4) === '.png' || src.substr(src.length-4) === '.PNG') {
img[0].style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled='true',sizingMethod='crop',src='" + src + "')";
//console.log(document.images[i]);
@kathangeorg
kathangeorg / gist:2996121
Created June 26, 2012 14:34
typo3 tx_srfeuserregister_pi1 email
plugin.tx_srfeuserregister_pi1 {
create.evalValues {
zip = int, atLeast[5], atMost[5]
telephone = int, atLeast[6]
#email more than once possible
email = email
}
edit.evalValues {
zip = int,atLeast[5], atMost[5]
telephone = int, atLeast[6]
@kathangeorg
kathangeorg / gist:3149761
Created July 20, 2012 09:10
TYPO§ Workspace: change TCA settings
//insert in ext_tables.php
// increase number of workspace related backend users and backend usergroups
t3lib_div::loadTCA('sys_workspace');
$TCA['sys_workspace']['columns']['adminusers']['config']['maxitems'] = 99;
$TCA['sys_workspace']['columns']['members']['config']['maxitems'] = 99;
$TCA['sys_workspace']['columns']['reviewers']['config']['maxitems'] = 99;
// increase number of workspace related db and file mount points
$TCA['sys_workspace']['columns']['db_mountpoints']['config']['maxitems'] = 99;
$TCA['sys_workspace']['columns']['file_mountpoints']['config']['maxitems'] = 99;
@kathangeorg
kathangeorg / gist:3294039
Created August 8, 2012 10:16
TYPO3 Indexed Search
#INDEXED SEARCH ENGINE - PLUGIN
config.index_enable = 1
plugin.tx_indexedsearch.search.rootPidList = 1
@kathangeorg
kathangeorg / gist:3295201
Created August 8, 2012 13:56
MySQL ALTER a bunch of TABLES
select concat("alter table ",TABLE_SCHEMA,".",TABLE_NAME," CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;")
from information_schema.TABLES where TABLE_SCHEMA="SWZM2";
@kathangeorg
kathangeorg / gist:3526107
Created August 30, 2012 10:45
1und1 file_get_content() Alternative cURL
Link: http://it.toolbox.com/wiki/index.php/Switch_from_file_get_contents_to_curl
------------------------------------------
------------------------------------------
Alter Code:
------------------------------------------
$data = file_get_contents($url);