Skip to content

Instantly share code, notes, and snippets.

View dwolke's full-sized avatar
👻
Hurz

Daniel Wolkenhauer dwolke

👻
Hurz
View GitHub Profile
@dwolke
dwolke / org.nodered.plist
Created January 23, 2024 22:50 — forked from natcl/org.nodered.plist
Node-Red launchd script
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd >
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.nodered.plist</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/node</string>
<string>/usr/local/bin/node-red</string>
@dwolke
dwolke / UnauthorizedStrategy.php
Created April 26, 2021 20:27 — forked from akrabat/UnauthorizedStrategy.php
bjyAuthorise view strategy to redirect to login page on auth failure
<?php
namespace Application\View;
use BjyAuthorize\Service\Authorize;
use Zend\EventManager\EventManagerInterface;
use Zend\EventManager\ListenerAggregateInterface;
use Zend\Http\Response as HttpResponse;
use Zend\Mvc\MvcEvent;
use Zend\Stdlib\ResponseInterface as Response;
@dwolke
dwolke / ofilter.php
Last active April 26, 2020 10:04 — forked from amnuts/ofilter.php
Filter an array of objects based on property, or multiple property values (http://blog.amnuts.com/2017/07/22/filter-an-array-of-objects/)
<?php
/**
* Filter an array of objects.
*
* You can pass in one or more properties on which to filter.
*
* If the key of an array is an array, then it will filtered down to that
* level of node.
*
@dwolke
dwolke / .htaccess
Last active March 17, 2020 16:09
WordPress htaccess
# BEGIN WpFastestCache
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTPS} =on
RewriteCond %{HTTP_HOST} ^meine-domain.com
# Start WPFC Exclude
# End WPFC Exclude
@dwolke
dwolke / profile_1.json
Created November 19, 2019 21:23
Einige Beispiele für Terminal-Konfig
{
"defaultProfile": "{79285a8e-036c-446f-8a9c-78994e34bf85}",
"initialRows": 30,
"initialCols": 120,
"alwaysShowTabs": true,
"showTerminalTitleInTitlebar": true,
"showTabsInTitlebar": true,
"requestedTheme": "dark",
"profiles": [
{
@dwolke
dwolke / gradients.css
Created September 11, 2019 18:40
CSS Gradients
/*
*
* GRADIENTS.CSS
* v.1.0.0
* @mrmrs
*
* Each color has a class for setting a gradient on
* text & background
*
* - Aqua
@dwolke
dwolke / multipartMailsWithAttachment.php
Created August 17, 2019 10:55
Senden von mehreren Anhängen mit Zend\Mails
<?php
/**
* @see https://akrabat.com/sending-attachments-in-multipart-emails-with-zendmail/
*/
use Zend\Mail\Message;
use Zend\Mime\Message as MimeMessage;
use Zend\Mime\Part as MimePart;
use Zend\Mime\Mime;
use Zend\Mail\Transport\Sendmail;
@dwolke
dwolke / testFactoryWithDependencies.php
Last active August 17, 2019 10:26
Factories mit PHPunit Testen
/**
* @see https://stackoverflow.com/questions/32714011/using-phpunit-and-zf2-factory
*/
class MailerFactoryTest extends TestCase
{
/**
* @covers ZfMailer\Service\MailerFactory::createService
*/
@dwolke
dwolke / Abstrakte Klassen Testen.php
Created August 17, 2019 10:18
Abstrakte Klasse mit PHPunit testen.
<?php
/**
* @see https://medium.com/@DarkGhostHunter/phpunit-testing-abstract-classes-with-an-anonymous-class-de77b0beb696
*/
namespace Tests;
use PHPUnit\Framework\TestCase;
use MyVendor\MyPackage\AbstractClass;
class AbstractTest extends TestCase