Skip to content

Instantly share code, notes, and snippets.

View larsschenk's full-sized avatar
💭
Working on ActiveBarcode

Lars Schenk larsschenk

💭
Working on ActiveBarcode
View GitHub Profile
@larsschenk
larsschenk / indexAndLayoutInOneFile.php
Created May 24, 2010 12:32
indexAndLayoutInOneFile.php
<?php
/**
* indexAndLayoutInOneFile.php
*
* Demo how to use one single file for layout
* within the same file.
*
* This is what TE requested for usage at CMS system RedDot to avoid different "trees".
*/
@larsschenk
larsschenk / Rewrite: Redirect to main server name
Created November 29, 2010 12:10
Rewrite rule in apache config to allow only specific server names.
# Allow only www.domain.com and www2.domain.com.
# Redirect all other server alias names to the main name.
# SEO: To avoid "duplicate content" you should have only one allowed server name.
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.domain\.com [NC] [OR]
RewriteCond %{HTTP_HOST} !^www2\.domain\.com [NC] [OR]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/(.*) http://www.domain.com/$1 [L,R=permanent]
<?php
/**
* class BoxesClass is where the webdesigner can layout specific page elements typical used
* in the right column as boxes.
*
* These elements are not usualy used on every single page like the PartialsClass elements.
* So the partials are much more basic (footer, header, Navigation...)
*
* The boxes are specific.
* Typical boxes are used for teasers.
@larsschenk
larsschenk / gist:1290218
Created October 15, 2011 22:03
MacVim snapshot 62 install with homebrew on lion with Xcode 4.2 failed
Check dependencies
2011-10-15 19:20:19.496 xcodebuild[23732:4403] error: Error Domain=NSPOSIXErrorDomain Code=2 "Non-zero exit code 127 returned from shell command: /Developer/usr/bin/gcc-4.2 -v -E -dM -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.7.sdk -x objective-c -c /dev/null 2>&1" UserInfo=0x401a7d320 {NSLocalizedDescription=Non-zero exit code 127 returned from shell command: /Developer/usr/bin/gcc-4.2 -v -E -dM -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.7.sdk -x objective-c -c /dev/null 2>&1, NSLocalizedFailureReason=No such file or directory}
2011-10-15 19:20:19.497 xcodebuild[23732:4403] Warning: Couldn't discover the 'gcc-4.2' compiler's built-in search paths and preprocessor definitions for language dialect 'objective-c'.
Compiler: /Developer/usr/bin/gcc-4.2
Reason: /Developer/usr/bin/gcc-4.2 -v -E -dM -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.7.sdk -x objective-c -c /dev/null 2>&1
2011-10-15 19:20:19.543 xcodebuild[23732:4403] error: Error Domain=NSPOSIXErrorDomain Code=22 "Non-zer
@larsschenk
larsschenk / gist:1301446
Created October 20, 2011 15:35
Dossiers Schulen Übersicht
<!--@selection {
"title":"Grundschulen",
"sqlwhere": "
News.pay = 0 AND
News.id IN (3171501,3171500,3171496,3171495,3171494,3266384)
ORDER BY News.start_publication DESC
",
"sqllimit":"6",
"sqldays":"0",
"targetpath":"/dossiers/schulen/grundschulen",
@larsschenk
larsschenk / gist:1448315
Created December 8, 2011 20:02
install ec2-api-tools with brew on fresh lion (note to myself)
brew install ec2-api-tools
does not do the job to make it run on my fresh Lion.
Because Apple does not have the full Java on Lion we need to upgrade from:
http://support.apple.com/kb/DL1421
Download an install.
@larsschenk
larsschenk / muuid-timestamp.xml
Created April 12, 2012 01:20
Mobile xml upload
<?xml version="1.0" encoding="UTF-8"?>
<documents xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<document id="210-uiid-mobile">
<element name="customerdocid">
<value>uiid-mobile</value>
</element>
<element name="title">
<value>Schwerin gibt Geld für neue Leitstelle</value>
</element>
<element name="url">
@larsschenk
larsschenk / gist:2474933
Created April 24, 2012 00:33
Purchase on account - https
<!-- Google Code for Purchase on account Conversion Page -->
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 1071940896;
var google_conversion_language = "de";
var google_conversion_format = "1";
var google_conversion_color = "666666";
var google_conversion_label = "gbfcCOiRUxCgipL_Aw";
var google_conversion_value = 0;
if (50) {
@larsschenk
larsschenk / gist:2480992
Created April 24, 2012 15:59
Google Code for Purchased via ShareIt Conversion Page
<!-- Google Code for Purchased via ShareIt Conversion Page -->
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 1071940896;
var google_conversion_language = "de";
var google_conversion_format = "2";
var google_conversion_color = "ffffff";
var google_conversion_label = "kxLZCKLm1wIQoIqS_wM";
var google_conversion_value = 0;
if (250) {
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=UTF-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="robots" content="index, follow, noarchive" />