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 | |
$dir = 'images/'; | |
$files = scandir($dir); | |
foreach($files as $i => $name) { | |
if($i > 2){ | |
$filename = $name; | |
$newname = $i-2 . '_' . $filename; | |
if ($newname != $filename) { | |
rename($dir.$filename, $dir.$newname); |
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 compressFiles(array $files){ | |
$debug = false; | |
$buffer = ''; | |
$firstFile = $files[0]; | |
if($debug === true){ | |
switch(pathinfo($firstFile)['extension']){ | |
case 'css': | |
foreach ($files as $file) { |
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
import scrapy | |
class MySpider(CrawlSpider): | |
name = 'imageaggr' | |
start_urls = ['https://www.datagon.de'] | |
rules = ( | |
# Extract links matching 'category.php' (but not matching 'subsection.php') | |
# and follow links from them (since no callback means follow=True by default). |
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
site/plugins/sortable/sortable/actions/add/forms/add.php | |
foreach($page->blueprint()->pages()->template()->filterBy('name', '*=', $field->prefix()) as $template) { | |
$options[$template->name()] = $template->title(); | |
} |
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
[ | |
{ id: 'Afghanistan', text: 'Afghanistan'}, | |
{ id: 'Aland Islands', text: 'Aland Islands'}, | |
{ id: 'Albania', text: 'Albania'}, | |
{ id: 'Algeria', text: 'Algeria'}, | |
{ id: 'American Samoa', text: 'American Samoa'}, | |
{ id: 'Andorra', text: 'Andorra'}, | |
{ id: 'Angola', text: 'Angola'}, | |
{ id: 'Anguilla', text: 'Anguilla'}, | |
{ id: 'Antarctica', text: 'Antarctica'}, |
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
function stuffForResizeAndReady(){ | |
var doc = jQuery(document), | |
windowWidth = jQuery(window).innerWidth(), | |
windowHeight = jQuery(window).innerHeight(), | |
container = jQuery('body > .container'), | |
containerWidth = container.width(), | |
containerPadding = (container.outerWidth() - containerWidth) / 2, | |
menu = jQuery('#hauptmenue_e1'), | |
menuPosition = menu.offset(), | |
kopfteilOben = jQuery('#kopfteil_oben'), |
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
{ | |
"metadata": { | |
"name": "Sevendays Icons", | |
"lastOpened": 1418773394855, | |
"created": 1497381487453 | |
}, | |
"iconSets": [ | |
{ | |
"selection": [ | |
{ |
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
<!DOCTYPE html> | |
<!-- Die Ausrichtung der Sprache der Webseite, hier: Deutsch --> | |
<html class="no-js" lang="<?php echo $site->languages()->code() ?>"> | |
<head> | |
<!-- Zeichencodierung, damit Umlaute und ähnliches korrekt dargestellt werden --> | |
<meta charset="utf-8"> | |
<!-- Verwende die neueste, beim Benutzer, verfügbare InternetExplorer Version --> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<!-- Löse die URLs von externen Quellen vor dem Laden der Datei auf – sollte dann etwas schneller laden. Beispielhaft: --> | |
<link rel="dns-prefetch" href="//cdnjs.cloudflare.com"> |
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
<form class="contactform" action="" method="post" accept-charset="UTF-8" role="form"> | |
<?php if($contactalert): ?> | |
<div class="alert" role="alert"> | |
<h4 class="pull-left"><?php echo l::get('alert')?></h4> | |
<button type="button" class="unloadalert btn btn-default-white pull-right" aria-label="Close"><i class="icon-cross" aria-hidden="true"></i></button> | |
<ul style="clear: both"> | |
<?php foreach($contactalert as $contactmessage): ?> | |
<li><?php echo html($contactmessage) ?></li> | |
<?php endforeach ?> | |
</ul> |
NewerOlder