Skip to content

Instantly share code, notes, and snippets.

View b0r1sp's full-sized avatar

brx b0r1sp

  • Wien
View GitHub Profile
@b0r1sp
b0r1sp / TS-Condition for opening hours
Last active July 29, 2016 14:46
Useful condition if you like to change frontend output outside the regular opening hours (of a store or whatever).
# TYPOSCRIPT
[dayofweek = 6,0] || [dayofweek = 1,2,3,4,5] && [hour = > 17, < 9]
# do whatever when it's NOT Mo-Fr and 09:00-18:00
[END]
@b0r1sp
b0r1sp / TYPO3 Gridelements setup for Foundation – Flexform
Last active August 29, 2015 14:00
TYPO3 Gridelements setup for Foundation
# FLEXFORM / Snippet with ❤ by Typoheads
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<T3DataStructure>
<meta>
<langDisable>1</langDisable>
</meta>
<ROOT type="array">
<type>array</type>
<el type="array">
// Source: http://www.bram.us/2014/01/01/skrollr-css-animations-linked-to-scroll-position/
var setSkrollr = function($el, data) {
for (var i = 0, l = data.length; i < l; i++) {
var d = data[i],
px = d[0];
css = d[1];
$el.attr('data-' + px, css);
}
}
#!/usr/bin/env bash
DOCKER=`which docker`
usage()
{
echo "Usage: $(basename $0) [-l num] IMAGE"
exit 0
}
@b0r1sp
b0r1sp / largestFiles.py
Created February 17, 2016 10:54 — forked from nk9/largestFiles.py
Python script to find the largest files in a git repository.
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Python script to find the largest files in a git repository.
# The general method is based on the script in this blog post:
# http://stubbisms.wordpress.com/2009/07/10/git-script-to-show-largest-pack-objects-and-trim-your-waist-line/
#
# The above script worked for me, but was very slow on my 11GB repository. This version has a bunch
# of changes to speed things up to a more reasonable time. It takes less than a minute on repos with 250K objects.
@b0r1sp
b0r1sp / CleanSource.php
Created February 23, 2016 12:09 — forked from uberboom/CleanSource.php
TYPO3: Hook to remove the generator meta tag (TYPO3 CMS 6.2)
<?php
namespace Your\Extension\Namespace\Hooks;
/**
* Clean up source
*/
class CleanSource extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin
{
/**