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
#!/usr/bin/env bash | |
rm -rf var/cache | |
# If the console using not same version as the web, then add before vendor the executable php command. | |
vendor/bin/contao-console cache:warmup --env=pro | |
vendor/bin/contao-console cache:warmup --env=dev |
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 isInViewport = function (elem) { | |
var bounding = elem.getBoundingClientRect(); | |
return ( | |
bounding.top >= 0 && | |
bounding.left >= 0 && | |
bounding.bottom <= (window.innerHeight || document.documentElement.clientHeight) && | |
bounding.right <= (window.innerWidth || document.documentElement.clientWidth) | |
); | |
}; |
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
index index.php index.html; | |
location ~ ^/(favicon\.ico|robots\.txt)$ { | |
allow all; | |
log_not_found off; | |
access_log off; | |
} | |
# don't show templates | |
location ~* \.(tpl|html5|xhtml)$ { |
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
vendor/bin/contao-console doctrine:query:sql "INSERT INTO tl_user (tstamp, username, name, email, language, backendTheme, showHelp, thumbnails, useRTE, useCE, admin, dateAdded)VALUES(TIME, 'USERNAME', 'NAME', 'EMAIL', 'de', 'flexible', '1', '1', '1', '1', '1', TIME);" | |
vendor/bin/contao-console contao:user:password "USERNAME" --password="PASSWORD" |
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 | |
die ('This is not executable now! Please comment out this line.'); | |
$config = array( | |
'url' => 'https://getcomposer.org/composer.phar', | |
'dir' => __DIR__ . '/composer', | |
'bin' => __DIR__ . '/composer/composer.phar', | |
'json' => __DIR__ . '/composer/composer.json', | |
'command' => 'install' // The composer command update/install |
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; | |
server_name localhost; | |
root /Users/YOUR_USERNAME/Sites; | |
access_log /Library/Logs/default.access.log main; | |
location / { | |
include /usr/local/etc/nginx/conf.d/php-fpm; | |
} |
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
$(document).ready(function () { | |
$('.box').click(function (handler) { | |
if ($(this).find('a').length > 0) { | |
//best cross browser way for trigger links | |
var link = $(this).find('a')[0]; | |
// open links with target _blank or ctrl/cmd pressed in a new tab | |
// open links with shift key in a new window | |
if (link.target != '' |
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
$sprite-layout: smart; | |
$sprite: sprite-map('sprite/*.png'); | |
@mixin sprite-with-demension($map, $sprite-image) { | |
background-image: $map; | |
@include sprite-dimensions($map, $sprite-image); | |
@include sprite-background-position($map, $sprite-image); | |
} | |
@mixin sprite-without-demension($map, $sprite-image) { |