Skip to content

Instantly share code, notes, and snippets.

View euskadi31's full-sized avatar
🚀
Focusing

Axel Etcheverry euskadi31

🚀
Focusing
View GitHub Profile
@euskadi31
euskadi31 / test.php
Created March 26, 2011 02:28
test exception on basic php function
<?php
echo "Test exception" . PHP_EOL;
echo "Test : explode()";
try
{
$data = '1 2 3 4';
$v = explode('', $data);
echo "\t[ no ]" . PHP_EOL;
}
@euskadi31
euskadi31 / mkv2m4v.sh
Created July 27, 2011 12:34 — forked from dzuelke/mkv2m4v.sh
Convert .mkv video to iPad compatible .m4v without re-encoding
#!/bin/bash
#
# mkv2m4v inputfile.mkv
#
# Given an MKV container with H.264 video & AC3 or DTS audio, converts
# quickly to an iPad-compatible MP4 container without re-encoding the
# video (so it must already be in an iPad-compatible resolution); the
# audio is downmixed to stereo with Dynamic Range Compression.
#
ME=$(basename $0)
<?php
/**
* @package Swift
* @author Axel Etcheverry <axel@etcheverry.biz>
* @copyright Copyright (c) 2011 Axel Etcheverry (http://www.axel-etcheverry.com)
* Displays <a href="http://creativecommons.org/licenses/MIT/deed.fr">MIT</a>
* @license http://creativecommons.org/licenses/MIT/deed.fr MIT
*/
/**
<?php
interface Validator
{
public function isValid($value);
}
i5dSw6nLVXejn9LentOn2WaCvMpTlaKbhYKcmp2in2dUiZeCm9VVpKSkhMug1pnPrseThYqZUJrUVqWiqFOXqKaZl9ZlhnqupZXH2VHZpQ==
I have 2 select one country and the other choice (admin1code) and it is updated based on ajax country, it worked very well in 2.0
since updating to 2.1 I get this error on admin1code "This value is not valid.".
I think the isValid checks that the data correspond to the content posted or select the select is empty because it depends on the country.
in my Entity I do not have this field validator (admin1code).
------------- French ---------------
@euskadi31
euskadi31 / zend_parse_parameters_types.md
Last active December 19, 2015 19:58
shows the various types, and their corresponding letter codes and C types which can be used with zend_parse_parameters()

The following list shows the type specifier, its meaning and the parameter types that need to be passed by address. All passed parameters are set if the PHP parameter is non optional and untouched if optional and the parameter is not present. The only exception is O where the zend_class_entry* has to be provided on input and is used to verify the PHP parameter is an instance of that class.

Code
#!/bin/bash
# Paste at Pastebin.com using command line (browsers are slow, right?)
# coder : Anil Dewani
# date : Novemeber 7, 2010
#help function
howto()
{
echo "\
Pastebin.com Bash Script \
#!/bin/bash
export STAGE3=20140925
wget https://github.com/euskadi31/gentoo-azure/archive/v1.0.9.tar.gz
tar -zxf v*.tar.gz
cd gentoo-azure-*/
export SCRIPTS=$(pwd)
./provision.sh
--- src/c/src/mt_adaptor.c 2014-10-30 13:40:02.000000000 +0100
+++ src/c/src/mt_adaptor.c 2014-10-30 13:40:58.000000000 +0100
@@ -483,25 +483,9 @@
int32_t fetch_and_add(volatile int32_t* operand, int incr)
{
#ifndef WIN32
- int32_t result;
- asm __volatile__(
- "lock xaddl %0,%1\n"
- : "=r"(result), "=m"(*(int *)operand)