Skip to content

Instantly share code, notes, and snippets.

@aschempp
aschempp / gist:5245299
Last active August 9, 2023 09:35
Force use of www. domain
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule (.*) https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,NC,L]
@aschempp
aschempp / gist:4682480
Last active December 12, 2015 00:18
Allow to load multiple tinyMCE configs
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 = {};
<?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 July 30, 2017 13:45
htaccess: SSL erzwingen
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,NC,L]
@aschempp
aschempp / gist:3742809
Created September 18, 2012 12:18
Custom Contao form styling
<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 February 15, 2012 09:13
Automatically create callto: and skype: links for phone numbers and contacts on Highrise.
@aschempp
aschempp / gist:1513710
Created December 23, 2011 09:26
Moving a Contao extension into its own GitHub Repository
#!/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 September 27, 2011 07:21 — 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.
// ==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==