This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var source = require('vinyl-source-stream'); | |
var request = require('request'); | |
var merge = require('merge2'); | |
var concat = require('gulp-concat'); | |
var buffer = require('gulp-buffer'); | |
/** | |
* 1. We request the latest jQuery version from the jQuery CDN. The | |
* request package allows for streaming. What we get in return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Exclude Piwik and Google Analytics parameter from cHash | |
$GLOBALS['TYPO3_CONF_VARS']['FE']['cHashExcludedParameters'] .= ', pk_campaign, pk_kwd, utm_source, utm_medium, utm_campaign, utm_term'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function multiexplode ($delimiters,$string) { | |
$ready = str_replace($delimiters, $delimiters[0], $string); | |
$launch = explode($delimiters[0], $ready); | |
return $launch; | |
} | |
// uso | |
$exploded = multiexplode(array(",",".","|",":"),$text); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
url="http://get.typo3.org/7" | |
target="t3latest.tar.gz" | |
workingdirectory=${PWD} | |
clear | |
echo "Getting the TYPO3 Sources from ${url}, writing to ${target}" | |
# get the sourcec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Upload files. | |
* | |
* @return void | |
*/ | |
public function uploadAction() { | |
$overwriteExistingFiles = TRUE; | |
$data = array(); | |
$namespace = key($_FILES); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#adaptive images lib for TYPO3 | |
lib.adaptive-images = COA | |
lib.adaptive-images { | |
1 = TEXT | |
1.value = <figure class="csc-textpic-imagecolumn###CLASSES###"><noscript | |
10 = IMG_RESOURCE | |
10 { | |
file.import.current = 1 | |
file.maxW = 480 | |
file.override.data = {$styles.content.imgtext.maxW} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
root /var/www/craft.dev/public; | |
index index.php index.html index.htm; | |
server_name craft.dev; | |
location / { | |
try_files $uri $uri/ @rewrites; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$src = 'http://player.vimeo.com/video/1234'; | |
preg_match('!video\/([0-9]+)!i', $src, $match); | |
$id = $match[1]; | |
$apiurl = 'http://vimeo.com/api/v2/video/' . $id . '.json'; | |
$response = file_get_contents($apiurl); | |
$json = json_decode($response, true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
$.fn.smoothScroll = function() { | |
return this.on('click', function() { | |
var hash = $(this).attr('href'); | |
var dest = $(hash).offset(); | |
$('html:not(:animated),body:not(:animated)').animate({scrollTop: dest.top, scrollLeft: dest.left}, 500, function() { | |
window.location.hash = hash; |