I hereby claim:
- I am heiglandreas on github.
- I am heiglandreas (https://keybase.io/heiglandreas) on keybase.
- I have a public key whose fingerprint is 967C CFA5 0DFF EE03 BB8B F5F2 CA92 13C7 5BFC E472
To claim this, I am signing this object:
<?php | |
// Requires PDFlib >= 8.0.0 | |
header('Content-Type: application/pdf'); | |
$pdf = new PDFlib(); | |
$pdf->begin_document('',''); | |
$pdf->begin_page_ext(100,100,''); | |
$pdf->create_annotation(10,40,20,50, 'text', 'contents={testcontent} name=1 title={foo} popup=2 annotcolor={rgb 1 1 0}'); | |
$pdf->create_annotation(10,40,20,50, 'popup', 'name=2 parentname=1'); | |
$pdf->create_annotation(10,40,20,50,'text','contents={Marked festgelegt von foo} name=3 custom={{key=State type=string value=Marked} {key=StateModel type=string value=Marked}} title={foo} popup=4 inreplyto=1 annotcolor={rgb 1 1 0}'); | |
$pdf->create_annotation(10,40,20,50, 'popup', 'name=4 parentname=3'); |
<?php | |
/** | |
* This gist expects the following parameters | |
* | |
* @param string $ldapURI The LDAP-Uri. Something like ldaps://example.com:636 or ldap://example.com/396 | |
* @param string|null $rdnUsername The DN of a user with read-credentials to the LDAP. Not necessary for anonymous bind. | |
* @param string|null $rdnPassword THe password of the $rdnUsername | |
* @param string|null $filter THe filter to be used to find the user in the LDAP | |
*/ |
foreach (explode(' ', $text) as $i => $token) { | |
$textflow = $pdf->add_textflow($textflow, $token, 'matchbox={name={' . $i . '}}'); | |
$textflow = $pdf->add_textflow($textflow, ' ', 'matchbox=end'); | |
} |
# Setting up a local solr instance on a mac | |
# install solr with homebrew | |
brew install solr | |
# create the base solr index directory | |
sudo cp -r /usr/local/opt/solr/libexec/example/multicore/* /Library/Solr/ | |
# make sure you can write to the solr logs | |
sudo chown -R `whoami` /usr/local/Cellar/solr/ |
I hereby claim:
To claim this, I am signing this object:
function convertLdapArray($resultArray) | |
{ | |
$attributes = array(); | |
foreach ($resultArray as $key => $value) { | |
if (! is_String($key)) { | |
continue; | |
} | |
// This is an integer key | |
if (! isset($resultArray[$value]) { | |
$resultArray[$value] = array(); |
#!/bin/bash | |
# | |
# Provision a Vagrant Box containing an OpenLDAP-Server to execute | |
# tests for PHPs ext-ldap against | |
apt-get update | |
DEBIAN_FRONTEND=noninteractive aptitude install -q -y slapd ldap-utils | |
export SLAPPASS=`slappasswd -s password` |
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 |
<?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: | |
* |
/** | |
* Always return false | |
* | |
* @return false | |
*/ | |
public function returnFalse() | |
{ | |
return true; | |
} |