Skip to content

Instantly share code, notes, and snippets.

@dominikzogg
dominikzogg / geolocation.html
Created January 8, 2012 12:37
Geolocation mit Mootools, Google Map
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=true"></script>
<script type="text/javascript" src="tl_files/MooGeo-yui-compressed.js"></script>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
window.addEvent('domready', function()
{
// Configuration
mapdiv = 'mapdiv';
latdestination = 47;
londestination = 8;
@dominikzogg
dominikzogg / docreadywindowload-jquery.js
Created January 8, 2012 13:57
DOM Loaded / Window Loaded Jquery
jQuery(document).ready(function()
{
// wird ausgefuehrt wenn der DOM fertig geladen ist
});
jQuery(window).load(function()
{
// wird ausgefuehrt wenn der DOM inkl. Bildern usw. geladen ist
});
@dominikzogg
dominikzogg / docreadywindowload-mootools.js
Created January 8, 2012 13:58
DOM Loaded / Window Loaded Mootools
window.addEvent('domready', function()
{
// wird ausgefuehrt wenn der DOM fertig geladen ist
});
window.addEvent('load', function()
{
// wird ausgefuehrt wenn der DOM inkl. Bildern usw. geladen ist
});
@dominikzogg
dominikzogg / contao-piwik-window-load.html
Created January 8, 2012 14:02
Load Contao Piwik tracking after window load
<!-- indexer::stop -->
<!-- Piwik -->
<script type="text/javascript">
<!--//--><![CDATA[//><!--
window.addEvent('load', function()
{
var pkBaseURL = 'https:' == document.location.protocol ? 'https://www.<domain>.<tld>/' : 'http://www.<domain>.<tld>/';
Asset.javascript(pkBaseURL + 'piwik.js',
{
onLoad: function(){
@dominikzogg
dominikzogg / contao-googleanalytics-window-load.html
Created January 8, 2012 14:04
Load Contao Googleanalytics tracking after window load
<!-- indexer::stop -->
<!-- Google Analytics -->
<script type="text/javascript">
<!--//--><![CDATA[//><!--
window.addEvent('load', function()
{
var gaJsHost = (('https:' == document.location.protocol) ? 'https://ssl.' : 'http://www.');
Asset.javascript(gaJsHost + 'google-analytics.com/ga.js',
{
onload: function()
@dominikzogg
dominikzogg / ftp.class.php
Created January 8, 2012 14:07
ftp.class.php
<?php
/**
* ftp.class.php
*
* Distributed under the GNU Lesser General Public License (LGPL v3)
* (http://www.gnu.org/licenses/lgpl.html)
* This program is distributed in the hope that it will be useful -
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@dominikzogg
dominikzogg / xls.class.php
Created January 8, 2012 14:22
Pseudo xls class for php
<?php
/**
* xls.class.php
*
* Distributed under the GNU Lesser General Public License (LGPL v3)
* (http://www.gnu.org/licenses/lgpl.html)
* This program is distributed in the hope that it will be useful -
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@dominikzogg
dominikzogg / ics.class.php
Created January 8, 2012 14:25
Ics class for php
<?php
/**
*
* Distributed under the GNU Lesser General Public License (LGPL v3)
* (http://www.gnu.org/licenses/lgpl.html)
* This program is distributed in the hope that it will be useful -
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
@dominikzogg
dominikzogg / very-simple-encodingtester.php
Created January 8, 2012 14:27
very simple mysql encoding tester written in php
<?php
//header('content-type: text/html; charset=latin1');
header('content-type: text/html; charset=utf8');
$connection['host'] = "localhost";
$connection['username'] = "";
$connection['password'] = "";
$connection['database'] = "";
@dominikzogg
dominikzogg / pdo-prep-stat-examples.php
Created January 8, 2012 14:29
PDO prepared statement examples
<?php
/* MYSQL Verbindungsdaten */
$mysql_connection['host'] = "";
$mysql_connection['username'] = "";
$mysql_connection['password'] = "";
$mysql_connection['database'] = "";
/* POSTGRESQL Verbindungsdaten */
$pgsql_connection['host'] = "";