Skip to content

Instantly share code, notes, and snippets.

View nicoknoll's full-sized avatar
💯
Getting things done.

Nico Knoll nicoknoll

💯
Getting things done.
View GitHub Profile

###HiDrive (Strato): 5TB kosten für die ersten 12 Monate 75€/Monat, danach 149€/Monat (bei 36 Monate Vertragslaufzeit). Vorteil ist auf jeden Fall, dass die Server in Deutschland stehen (Deutsche Datenschutzgesetze, kleine Entfernung = schnellerer Up-/Download) Anderer Vorteil: Funktioniert einwandfrei mit Synology

###CrashPlan Unlimitierte Anzahl an TB kosten zwischen 6$ und 12$ pro Monat. Nachteil: Server in den USA und Einrichtung mit Synology ist möglich, aber deutlich komplizierter als HiDrive

###Amazon Glacier

<?php
if($_GET['ende']) {
$end = (int)$_GET['ende'];
setcookie('wochenendende', $end, 9999999999, '/');
} else {
$end = (($_COOKIE['wochenendende']) ? (int)$_COOKIE['wochenendende'] : 17);
}
// Die Ausgabe
echo $end;
?>

File related problems

This guide will help you to solve the most common problems related to files.

File permissions

First of all (even if you don't have any problems at the moment) you should make sure that your current file permissions are right set:

/site/assets/ 755 (recursively)
...
@nicoknoll
nicoknoll / Guide.md
Last active August 29, 2015 14:04
Troubleshooting Processwire
<?php
foreach($page->parents()->append($page)->slice(1)->reverse() as $parent) { echo ucfirst($parent->get('headline|title')).' - '; } echo 'Page Title';
@nicoknoll
nicoknoll / gist:10661190
Created April 14, 2014 16:02
Wordpress vs. Processwire
<?php
the_title();
?>
<?php
function replaceSrc($matches) {
global $page;
$url = $matches[1];
$img = 'images/'.basename($url);
$handle = fopen($img, 'w+');
$data = file_get_contents($url);
<?php
function getTracks() {
$data = json_decode(file_get_contents('http://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&user=derstadtpirat&api_key=LASTFMAPIKEY&format=json&limit=70&nowplaying=true'), true);
$tracks = array();
foreach($data['recenttracks']['track'] as $track) {
if($track['image'][0]['#text'] != '') {
$tracks[] = array(
'name' => trim($track['name']),
'album' => trim($track['album']['#text']),