This file contains hidden or 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/sh | |
DATE=`date +%Y-%m-%d` | |
BASEDIR=$1 | |
TARGET=$2 | |
echo "Archiving & compressing all backups in: $BASEDIR" | |
for DIR in "$BASEDIR"/*; do | |
if test -d "$DIR"; then | |
ARCHIVE="$DIR-$DATE.tar.gz" |
This file contains hidden or 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
drush archive-dump --destination=/home/backups/site-`date '+%a'`.tar --preserve-symlinks --overwrite |
This file contains hidden or 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 | |
use Symfony\Component\HttpKernel\Kernel; | |
use Symfony\Component\Config\Loader\LoaderInterface; | |
class AppKernel extends Kernel | |
{ | |
public function registerBundles() | |
{ | |
$bundles = array( |
This file contains hidden or 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
<ul id="rating"> | |
<li class="star_off"><a title="Ich vergebe dem Rezept 1 Punkt" href="?star=1">Ich vergebe dem Rezept 1 Punkt</a></li> | |
<li class="star_off"><a title="Ich vergebe dem Rezept 2 Punkte" href="?star=2">Ich vergebe dem Rezept 2 Punkte</a></li> | |
<li class="star_off"><a title="Ich vergebe dem Rezept 3 Punkte" href="?star=3">Ich vergebe dem Rezept 3 Punkte</a></li> | |
<li class="star_off"><a title="Ich vergebe dem Rezept 4 Punkte" href="?star=4">Ich vergebe dem Rezept 4 Punkte</a></li> | |
<li class="star_off"><a title="Ich vergebe dem Rezept 5 Punkte" href="?star=5">Ich vergebe dem Rezept 5 Punkte</a></li> | |
</ul> |
This file contains hidden or 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 my_theme_preprocess_page(array &$variables) | |
{ | |
/** @var \Drupal\Core\Page\HtmlPage $page */ | |
$page = $variables['page']['#page']; | |
$metaElements = $page->getMetaElements(); | |
foreach ($metaElements as $index => $metaElement) | |
{ |
This file contains hidden or 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 getFormatedArray($string) { | |
$result = array(); | |
if (strpos($string, ',') !== false) { | |
$substrings = explode(',', $string); | |
foreach ($substrings as $substring) { | |
if (trim($substring) != '') { |
This file contains hidden or 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 copyBtn = document.querySelector('#copy'); | |
copyBtn.addEventListener('click', function (event) { | |
event.preventDefault(); | |
try { | |
document.querySelector('#code').select(); | |
document.execCommand('copy'); | |
} | |
catch (error) { | |
alert('Sorry, leider konnte nicht kopiert werden.'); |
This file contains hidden or 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 mymodule_preprocess_html(&$variables) { | |
if (array_key_exists('node_type', $variables) && $variables['node_type'] === 'category') { | |
\Drupal::service('page_cache_kill_switch')->trigger(); | |
} | |
} |
This file contains hidden or 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
AuthUserFile /var/www/... ../wp-admin/.htpasswd | |
AuthName "Members Only" | |
AuthType Basic | |
<Files "wp-login.php"> | |
require valid-user | |
</Files> |
This file contains hidden or 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
<Files xmlrpc.php> | |
Order Deny,Allow | |
Deny from all | |
</Files> |