Skip to content

Instantly share code, notes, and snippets.

@alrnz
alrnz / scene.sh
Last active May 8, 2019 08:52
Control Hue with linux sh-script #Shell #hue
#!/bin/tclsh
# Use with: /path/to/scene.tcl SCENEID-on-0
# Hue Bridge IP
set ip "192.168.0.67"
# Hue Username created via interface: http://www.developers.meethue.com/documentation/getting-started
set user "123abc456def"
if { $argc < 1 } {
@alrnz
alrnz / smoothAnkerScroll.js
Last active May 8, 2019 08:53
smoothAnkerScroll #JS
(function($) {
$(document).ready(function(){
function smoothAnkerScroll(){
try{
var hash = window.location.hash;
var target = hash.replace('#to-', '');
if(target != ''){
target = $('#' + target);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
@alrnz
alrnz / .htaccess
Last active February 14, 2023 13:29
[Mittwald htaccess] htaccess rules for Mittwald standard domains #htaccess #Mittwald
# mittwaldserver umleiten
RewriteEngine on
RewriteCond %{HTTP_HOST} ^.*\.mittwaldserver\.info [NC,OR]
RewriteCond %{HTTP_HOST} ^.*\.webspaceconfig\.de [NC]
RewriteCond %{HTTPS}s ^on(s)|
# # Zugriff verbieten (403 Fehler) (einfacher einzubinden, reicht für SEO)
# RewriteRule ^.* - [F]
# # umleiten auf andere Domain (besser für User)
RewriteRule ^ http%1://www.DOMAIN.de/$1 [R=301,L]
@alrnz
alrnz / indexed_search.ts
Last active May 8, 2019 08:51
Indexed Seach TYPO3 translation #TYPO3 #TypoScript
plugin.tx_indexedsearch {
_LOCAL_LANG {
en {
submit_button_label = Search
form_searchFor = Search for
searchFor = Your search for
pi_list_browseresults_display = Displaying results ###TAG_BEGIN###%s to %s###TAG_END### out of ###TAG_BEGIN###%s###TAG_END###
noResults = NO results found.
}
de {
@alrnz
alrnz / setup_direct_mail.ts
Last active May 8, 2019 08:49
include direct_mail in #TYPO3 #TypoScript
## Direct_mail static template for boundaries
#<INCLUDE_TYPOSCRIPT: source="FILE:EXT:direct_mail/Configuration/TypoScript/boundaries/setup.txt">
# tinysource breaks categories
plugin.tx_tinysource {
body {
stripComments = 0
}
}
@alrnz
alrnz / .htaccess
Last active May 8, 2019 08:49
htaccess redirects for www and https #htaccess
# redirect to german page
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} !=on
# domain matches
RewriteCond %{HTTP_HOST} ^www.domain\.de$ [NC]
# path is empty
RewriteCond %{REQUEST_URI} ^/$
RewriteCond %{SERVER_ADDR} !=127.0.0.1
RewriteCond %{SERVER_ADDR} !=::1
@alrnz
alrnz / direct_mail_subscription.ts
Last active May 8, 2019 08:47
direct_mail_subscription additional #TypoScript #TYPO3
plugin.feadmin.dmailsubscription {
pid = 425
templateFile = fileadmin/templates/html/dmailsubscription/dmailsubscrip_de.html
cObjects {
CATLIST = USER
CATLIST.userFunc = user_dmailsubscribe->makeCheckboxes
CATLIST {
templateFile = fileadmin/templates/html/dmailsubscription/dmailsubscrip_de.html
pid = 425
@alrnz
alrnz / sitemap.css
Last active August 29, 2018 22:59
Foldable Sitemap - TYPO3
# CSS includes
page.includeCSS.sitemap = fileadmin/templates/css/sitemap.css
# tt_content
# sitemap
tt_content {
# Sitemap
menu.20.2 {
stdWrap.wrap = <div id="sitemap-toggleAll"><p><a href="#" class="opened" style="display:none;">Alle <span class="opened">auf</span><span class="closed">zu</span>klappen</a></p></div>
wrap = <div class="block-sitemap">|</div>
@alrnz
alrnz / imagelightbox.min.js
Last active May 8, 2019 08:46
Responsive Touch Lightbox #JS #Lightbox
/*
By Osvaldas Valutis, www.osvaldas.info
Available for use under the MIT License
*/
;(function(e,t,n,r){"use strict";var i=function(){var e=n.body||n.documentElement,e=e.style;if(e.WebkitTransition=="")return"-webkit-";if(e.MozTransition=="")return"-moz-";if(e.OTransition=="")return"-o-";if(e.transition=="")return"";return false},s=i()===false?false:true,o=function(e,t,n){var r={},s=i();r[s+"transform"]="translateX("+t+")";r[s+"transition"]=s+"transform "+n+"s linear";e.css(r)},u="ontouchstart"in t,a=t.navigator.pointerEnabled||t.navigator.msPointerEnabled,f=function(e){if(u)return true;if(!a||typeof e==="undefined"||typeof e.pointerType==="undefined")return false;if(typeof e.MSPOINTER_TYPE_MOUSE!=="undefined"){if(e.MSPOINTER_TYPE_MOUSE!=e.pointerType)return true}else if(e.pointerType!="mouse")return true;return false};e.fn.imageLightbox=function(r){var r=e.extend({selector:'id="imagelightbox"',allowedTypes:"png|jpg|jpeg|gif",animationSpeed:250,preloadNext:true,enableKeyboard:true,quitOnEnd:false,quitOnIm
@alrnz
alrnz / ExampleController.php
Last active May 8, 2019 08:46
TYPO3 dependency injection for Extbase #TYPO3
<?php
//TYPO3 >= 6.0:
/**
* @var \Vendor\Extension\Domain\Repository\SomeRepository
* @inject
*/
protected $someRepository;