Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
The next step…

Michelangelo van Dam DragonBe

:octocat:
The next step…
View GitHub Profile
@DragonBe
DragonBe / config-php.sh
Created Nov 12, 2016
A quick configure script for building PHP
View config-php.sh
#!/bin/sh
PHP=$1
if [ $# -lt 1 ]
then
echo "Usage: $0 <php-version>"
echo
echo "php-version: php7 $PHP"
echo
@DragonBe
DragonBe / PHP-Project-Top10-List.md
Last active Aug 9, 2018
My personal top 10 list of PHP projects
View PHP-Project-Top10-List.md

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 / gitarchive.sh
Created Jun 7, 2018
Creating a GPG signed archive of your GIT source code with SHA 256 checksums in bash
View gitarchive.sh
#!/bin/bash
# Getting the current project's directory
pf=$(printf '%q\n' "${PWD##*/}")
# Getting the current configured user's email
gpguser=$(git config user.email)
if [ -z $gpguser ]
then
echo "!!! ERROR: No user for GIT configured !!!"
@DragonBe
DragonBe / dragdrop.html
Last active Feb 17, 2018
Simple Drag and Drop functionality using jQuery and jQuery UI
View dragdrop.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Drag and Drop example</title>
<!-- Bootstrap -->
@DragonBe
DragonBe / php_conferences_2016.md
Last active Feb 9, 2018
Overview of PHP oriented conferences in 2016 (excluding polyglot and framework oriented conferences)
View php_conferences_2016.md
@DragonBe
DragonBe / azure-sdk-commands.md
Created Dec 1, 2017
Basic Microsoft Azure CLI/SDK commands to quickly launch a web app on Azure cloud services
View azure-sdk-commands.md
azure login
azure group create -t project=<project_name> <group_name> westeurope
azure appserviceplan create <group_name> <service_name> westeurope F1
azure webapp create <group_name> <app_name> westeurope <service_name>
azure webapp config set --phpversion 7.1 --detailederrorloggingenabled true <group_name> <app_name>
@DragonBe
DragonBe / dnt-check.php
Created Oct 20, 2017
Functionality to verify if "Do not track" is set in the browser configuration.
View dnt-check.php
<?php
/**
* Functionality to verify if "Do not track" is set
* in the browser configuration.
*/
if (array_key_exists('HTTP_DNT', $_SERVER) && (1 === (int) $_SERVER['HTTP_DNT'])) {
echo 'Do not track me enabled';
} else {
echo 'Do not track me disabled';
@DragonBe
DragonBe / plugins.txt
Created Sep 7, 2017
Jenkins plugins preloader for Jenkins Docker image
View plugins.txt
ant
bouncycastle-api
build-timeout
checkstyle
cloverphp
crap4j
credentials-binding
credentials
docker-commons
docker-workflow
@DragonBe
DragonBe / php_conferences_fall_2017.md
Last active Jun 29, 2017
Overview of PHP conferences in the fall of 2017
View php_conferences_fall_2017.md
@DragonBe
DragonBe / SortableDirectoryIterator.php
Created Jun 22, 2017
Sortable DirectoryIterator based on last modification time
View SortableDirectoryIterator.php
class SortableDirectoryIterator extends RecursiveDirectoryIterator
{
/**
* \ArrayObject
*/
private $dirArray;
public function __construct(string $path)
{
parent::__construct($path);
You can’t perform that action at this time.