Skip to content

Instantly share code, notes, and snippets.

View DragonBe's full-sized avatar
:octocat:
The next step…

M van Dam DragonBe

:octocat:
The next step…
View GitHub Profile
@DragonBe
DragonBe / check404.sh
Created July 1, 2014 09:55
Quickly scan your Apache logs for 404 replies. Usage /bin/sh ./check404.sh /path/to/apache_log
#!/bin/sh
awk '$9 == 404 {print $7}' ${1} | uniq -c | sort -rn | head
@DragonBe
DragonBe / ZendMailTest.php
Created July 17, 2014 17:42
Testing if mail headers are properly removed
<?php
namespace BMytest;
class ZendMailTest extends \PHPUnit_Framework_TestCase
{
public function testRemovingHeadersFromMultipleMailObjects()
{
$mail1 = new \Zend_Mail();
$mail1->addHeader('foo', 'bar');
$mail1->addHeader('x-mfo-mailid', uniqid());
@DragonBe
DragonBe / GeehNiblett_Module.php
Last active August 29, 2015 14:15
GeehNiblett to override view templates in ZfCUser
<?php
namespace GeehNiblett;
use Zend\ModuleManager\Feature\AutoloaderProviderInterface;
use Zend\ModuleManager\Feature\ConfigProviderInterface;
class Module implements AutoloaderProviderInterface, ConfigProviderInterface
{
public function init($moduleManager)
{
@DragonBe
DragonBe / microblog.md
Created April 22, 2015 15:52
Assignment: Microblog

Microblog

The first assignment is to create a microblog application.

You can use Silex if you want, but it's not a requirement.

Objectives

  • Display the latest 5 articles on the homepage
  • Create an authentication section where someone can
<?php
declare(strict_types=1);
ini_set('highlight.comment', '#cc8800');
ini_set('highlight.default', '#6699cc');
ini_set('highlight.html','#000000');
ini_set('highlight.keyword', '#993333');
ini_set('highlight.string', '#66cc66');
$sourceCode = $previewCode = '';
@DragonBe
DragonBe / PHP-Project-Top10-List.md
Last active August 9, 2018 02:49
My personal top 10 list of PHP projects

PHP Project Top10 List

This list is my personal top 10 list of PHP projects that have no financial backup or support which deserves credits. I've also included my motivation as reference.

Software projects

  • Composer: It revolutionised PHP world by allowing people to build awesome components supported by major frameworks and tools
  • PHPUnit: Since it was ported to PHP it added quality and easy maintenance to a lot of projects
  • XDebug: This tool has offered developers a chance to analyse their code step by step to find bugs or solve coding mysteries
  • Slim Framework: A true PHP microframework
  • Phing: The PHP build tool
@DragonBe
DragonBe / The Continuous PHP Pipeline - Appendix.md
Created December 4, 2015 09:24
An overview of links to all services mentioned in my presentation "The Continuous PHP Pipeline"
Verifying that +dragonbe is my blockchain ID. https://onename.com/dragonbe
@DragonBe
DragonBe / php_conferences_2016.md
Last active February 9, 2018 08:02
Overview of PHP oriented conferences in 2016 (excluding polyglot and framework oriented conferences)