Skip to content

Instantly share code, notes, and snippets.

@heiglandreas
heiglandreas / ErrorHandler.php
Created April 29, 2016 05:53
Fix BC-Issue in Zend\Ldap 2.7.0
<?php
namespace Acme;
class ErrorHandler implements Zend\Ldap\ErrorHandlerInterface
{
public function startErrorHandling($level = E_WARNING)
{
set_error_handler(function($errNo, $errMsg){});
}
@heiglandreas
heiglandreas / .gitignore
Created April 18, 2016 19:06
Self signed certs without storing the cert in the repo
myrootca.crt
@heiglandreas
heiglandreas / GamifyYourDeveloperGrowth.md
Last active April 1, 2016 07:46
Gamify your growth as a developer?

I love to get better as a developer and when I get rewarded for that even better! In this session we'll have a look at ten tools that make our lives as developers easier and along the way allow us to become better as a developer. Services like Github or Bitbucket allow us to communicate with one another about code while Scrutinizer, Code-Climate or Insight can give us valuable informations on how to improve our coding skills and easily bring our code to a better level. Suddenly tedious tasks like writing unittests, reducing cyclomatic complexity and adding documentation can become entertaining and rewarding. All this because we all strive to get high marks, 100% or a green button. So let's see what the benefits of the different tools are and how we can integrate them into our build-chain.

@heiglandreas
heiglandreas / gist:86d2b3d4b86dcb1e2b82c09008d361fe
Last active March 29, 2016 18:49
npm install for callingallpapers.com
vagrant@vagrant-ubuntu-trusty-64:/vagrant$ npm install
npm WARN package.json [email protected] No README data
npm http GET https://registry.npmjs.org/grunt-uncss
npm http 304 https://registry.npmjs.org/grunt-uncss
npm http GET https://registry.npmjs.org/chalk
npm http GET https://registry.npmjs.org/uncss
npm http GET https://registry.npmjs.org/maxmin
npm http 304 https://registry.npmjs.org/chalk
npm http 304 https://registry.npmjs.org/maxmin
npm http 304 https://registry.npmjs.org/uncss
@heiglandreas
heiglandreas / time is an illusion.md
Last active February 17, 2016 19:55
time is an illusion (lunchtime doubly so)

Have you ever read a "Good morning" in an international IRC-Channel shortly before you leave the office for lunch? In international business time is an illusion. In this talk we'll dive into he depths of Timezones and how to handle them. We'll talk about the history of timezones to see why they are so important. And of course we'll examine how to handle those little buggers efficiently in code and database.

@heiglandreas
heiglandreas / gist:587fc245499e83721335
Created January 8, 2016 09:37
Blockchain-Verification
Verifying that +heiglandreas is my blockchain ID. https://onename.com/heiglandreas
<?php
add_filter('authenticate', function($user, $username, $password){
$userId = $user;
if ($user instanceof WP_User) {
$userId = $user->ID;
}
ataccama_permissions_setUserPermissions($userId);
return $user;
}, 20,1);
/**
* Always return false
*
* @return false
*/
public function returnFalse()
{
return true;
}
@heiglandreas
heiglandreas / gist:9a4133e3d3f8bada3a27
Last active August 28, 2015 10:04
How to describe needed information for a method
<?php
class TestAction implements GenericAction
/**
* How would I describe that this method required the 'test'-parameter to be set?
*
* It shouldn't be @param as it's not a parameter to the method. An inline/embedded PHPDoc-comment
* wouldn't work as there's nothing I could add it to.
*
* I would have expected something like @requires or @expects to define that like so:
*
@heiglandreas
heiglandreas / Vagrantfile
Created July 6, 2015 08:44
ext_ldap-Vagrantfile
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network "private_network", ip: "192.168.33.10"
config.vm.provision "shell", path: "https://gist.githubusercontent.com/heiglandreas/10e1c7dd80d6e058faae/raw/ext-ldap-test-provisioner.sh"
end