Skip to content

Instantly share code, notes, and snippets.

View MINVWS_CLA
# CONTRIBUTOR LICENCE AGREEMENT
###### version 1.00 / 2020-5-20
The State of the Netherlands, the Ministry of Public Health, Welfare and Sport (hereinafter: the Ministry) would like to utilise the knowledge of third parties in developing digital resources that could contribute to combating COVID-19 (hereinafter referred to collectively as: the Digital Resources).
You (hereinafter: the Contributor) wish to contribute to the development of the Digital Resources, for example in the form of new or an adaptation of existing software, designs, documentation, digital files and/or other works to which intellectual property rights can attach (hereinafter: the Contributions).
The purpose of this licence agreement is (i) to clarify the intellectual property rights to the Contributions and (ii) to enable the Ministry to use and publish the Contributions.
@ijansch
ijansch / jsonarrayfun.php
Last active Aug 29, 2015
2 common issues in php based apis
View jsonarrayfun.php
<?php
// Issue 1, empty associative arrays (dictionaries) become regular arrays.
$dictionary = array('key' => 'value');
var_dump(json_encode($dictionary)); // gives '{"key":"value"}';
unset($dictionary['key']);
var_dump(json_encode($dictionary)); // Gives '[]' -> json dictionary turned into array
@ijansch
ijansch / gist:187845faf6aea780fb99
Created Jul 14, 2014
Including the buildozer build number in an app
View gist:187845faf6aea780fb99
#!/bin/bash
buildVersion=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" "$INFOPLIST_FILE")
if [ -n "$BUILDOZER_BUILDNUMBER" ]; then
buildNumber=$BUILDOZER_BUILDNUMBER
else
buildNumber="dev"
fi
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildVersion.$buildNumber" "$INFOPLIST_FILE"
View gist:5018893
/usr/share/php/libzend-framework-php/Zend# diff Service/Twitter.php-unpatched Service/Twitter.php
61c61
< const OAUTH_BASE_URI = 'http://twitter.com/oauth';
---
> const OAUTH_BASE_URI = 'https://api.twitter.com/oauth';
View gist:5018891
root@ip-10-208-51-26:/usr/share/php/libzend-framework-php/Zend# diff Service/Twitter.php-unpatched Service/Twitter.php
61c61
< const OAUTH_BASE_URI = 'http://twitter.com/oauth';
---
> const OAUTH_BASE_URI = 'https://api.twitter.com/oauth';