Skip to content

Instantly share code, notes, and snippets.

View djpate's full-sized avatar

Christophe Verbinnen djpate

View GitHub Profile
@djpate
djpate / order.patch
Created January 12, 2011 08:11
Patch file for Request #21316
*** provider.c 2010-10-10 07:49:58.228327000 +0200
--- patch/provider.c 2011-01-12 08:39:24.004000517 +0100
***************
*** 744,764 ****
do {
long cb_res;
- retval = oauth_provider_call_cb(INTERNAL_FUNCTION_PARAM_PASSTHRU, OAUTH_PROVIDER_TSNONCE_CB);
- if (retval) {
- convert_to_long(retval);
private function verifyCaptcha($challenge,$response){
$handle = curl_init("http://www.google.com/recaptcha/api/verify");
$post = array("privatekey"=>$this->params['reCaptcha_private'],
"remoteip"=> $_SERVER['REMOTE_ADDR'],
"challenge"=>$challenge,
"response"=>$response);
curl_setopt($handle, CURLOPT_POST, true);
curl_setopt($handle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($handle, CURLOPT_POSTFIELDS, $post);
$info = explode("\n",curl_exec($handle));
pate@pepette:/var/www$ mkdir test
pate@pepette:/var/www$ cd test/
pate@pepette:/var/www/test$ git clone git://github.com/djpate/Kinaf.git
Cloning into Kinaf...
remote: Counting objects: 1150, done.
remote: Compressing objects: 100% (677/677), done.
remote: Total 1150 (delta 399), reused 1129 (delta 378)
Receiving objects: 100% (1150/1150), 915.54 KiB | 344 KiB/s, done.
Resolving deltas: 100% (399/399), done.
pate@pepette:/var/www/test$ cd Kinaf/
public function bind(array $values){
foreach($values as $field => $value){
$this->$field = $value;
}
}
/**
* Cette fonction valide que les arguments necessaire a l'execution d'une action
* sur un controllert sont présent et qu'il respecte le typage fournie par le docblock
* de l'action
* @param string $method
* @param array $arguments
* @throws \BadMethodCallException
* @throws \InvalidArgumentException
*/
public function checkArguments($method, $arguments){
$( "#user" ).autocomplete({
source: {{routes.url_to('users', 'autocomplete')}},
minLength: 2,
select: function( event, ui ) {
$('#input_user').val(ui.item.value);
},
open: function() {
$( this ).removeClass( "ui-corner-all" ).addClass( "ui-corner-top" );
},
close: function() {
echo in_array("test",array(true,false,0,1,"0","1","true","false"));
> 1
<?php
Class user{
public function getAge(){ return "25";}
}
?>