Skip to content

Instantly share code, notes, and snippets.

Avatar

Andreas Schempp aschempp

View GitHub Profile
@aschempp
aschempp / gist:5245299
Last active Dec 15, 2015
Force use of www. domain
View gist:5245299
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule (.*) http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,NC,L]
@aschempp
aschempp / gist:4682480
Last active Dec 12, 2015
Allow to load multiple tinyMCE configs
View gist:4682480
var tinyMCE_GZ_shim = tinyMCE_GZ_shim || (function() {
"use strict";
var tinyMCE_GZ = window.tinyMCE_GZ;
var tinyMCE = null;
var initialized = false;
var config_gz = [];
var config_tiny = {};
View gist:4343854
<?php
$arrMap = array(1=>17, 34=>98);
$strBody = '
Nina Gerling said On Thu, Dec 30. 2010
I\'d recomment using the headline like I recommended in ticket #326:
my comment on this, also watch out on #34, but do not convert @#6 but
#1 should be';
@aschempp
aschempp / gist:4147395
Last active Jul 30, 2017
htaccess: SSL erzwingen
View gist:4147395
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,NC,L]
@aschempp
aschempp / gist:3742809
Created Sep 18, 2012
Custom Contao form styling
View gist:3742809
<script>
window.addEvent('domready', function() {
document.getElements('.tableless .formbody').each( function(form) {
// Style radio containers
form.getElements('.radio_container span').each( function(radio) {
radio.addEvent('click', function() {
radio.getSiblings('span').removeClass('active').each( function(el) {
if (el.getElement('input.radio').checked) radio.addClass('active');
});
@aschempp
aschempp / highrise-links.user.js
Created Feb 15, 2012
Automatically create callto: and skype: links for phone numbers and contacts on Highrise.
View highrise-links.user.js
@aschempp
aschempp / gist:1513710
Created Dec 23, 2011
Moving a Contao extension into its own GitHub Repository
View gist:1513710
#!/bin/bash
##
# Useful ressources & links:
# http://john.albin.net/git/convert-subversion-to-git
# http://airbladesoftware.com/notes/moving-a-subdirectory-into-a-separate-git-repository
# http://nathanhoad.net/how-to-delete-a-remote-git-tag
# http://i.justrealized.com/2010/rename-tag-git/
##
@aschempp
aschempp / harvest-growler.user.js
Created Sep 27, 2011 — forked from mikedamage/harvest-growler.user.js
Fluid userscript for Harvest CO-OP Timer app. Pops a Growl notification every so often to remind me to track my hours if no timer is currently running.
View harvest-growler.user.js
// ==UserScript==
// @name CO-OP Timer Growl Reminder
// @namespace http://coopapp.com
// @description Displays Growl notifications at a user defined interval, reminding you to track your time.
// @include *
// @author Andreas Schempp
// @author Mike Green
// @version 0.1.1
// ==/UserScript==
You can’t perform that action at this time.