This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
**Updated requirements** | |
**Backward incompatible changes** | |
**New features** | |
**Other changes** | |
**Fixed** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_short_pwd () | |
{ | |
local PRE= NAME="$1" LENGTH="$2"; | |
[[ "$NAME" != "${NAME#$HOME/}" || -z "${NAME#$HOME}" ]] && | |
PRE+='~' NAME="${NAME#$HOME}" LENGTH=$[LENGTH-1]; | |
((${#NAME}>$LENGTH)) && NAME="/...${NAME:$[${#NAME}-LENGTH+4]}"; | |
echo "$PRE$NAME" | |
} | |
export CLICOLOR=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$__a = "/**\n"; | |
foreach (array_diff_key(get_defined_vars(), [ '__a' => true, '__k' => true, '__v' => true ]) as $__k => $__v) | |
{ | |
$__v = is_object($__v) ? '\\' . get_class($__v) : gettype($__v); | |
$__a .= " * @var \$$__k $__v\n"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use ICanBoogie\ActiveRecord; | |
use ICanBoogie\ActiveRecord\Connections; | |
use ICanBoogie\ActiveRecord\Model; | |
use ICanBoogie\ActiveRecord\Models; | |
use ICanBoogie\ActiveRecord\Query; | |
// in the bootstrap of your application |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$stable_sort = function(&$array, $picker=null) | |
{ | |
static $transform, $restore; | |
$i = 0; | |
if (!$transform) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace ICanBoogie\ActiveRecord; | |
/** | |
* Defines the `created_at` property and the corresponding getter/setter. | |
* | |
* @property \ICanBoogie\DateTime $created_at The date and time at which the record was created. | |
*/ | |
trait CreatedAtProperty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Baz | |
{ | |
protected $foo; | |
public function __construct($foo) | |
{ | |
$this->foo = $foo; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function utf_remove_accents_and_ligs($string) { | |
$utfNoAccentsNoLigsEquivalent=array( | |
0xc3 => array( | |
0xc380 => 'A', 0xc381 => 'A', 0xc382 => 'A', 0xc383 => 'A', 0xc384 => 'A', 0xc385 => 'A', 0xc386 => 'AE', 0xc387 => 'C', | |
0xc388 => 'E', 0xc389 => 'E', 0xc38a => 'E', 0xc38b => 'E', 0xc38c => 'I', 0xc38d => 'I', 0xc38e => 'I', 0xc38f => 'I', | |
0xc390 => 'D', 0xc391 => 'N', 0xc392 => 'O', 0xc393 => 'O', 0xc394 => 'O', 0xc395 => 'O', 0xc396 => 'O', 0xc398 => 'O', | |
0xc399=> 'U', 0xc39a => 'U', 0xc39b => 'U', 0xc39c => 'U', 0xc39d => 'Y', 0xc39f => 'S', 0xc3a0 => 'a', 0xc3a1 => 'a', | |
0xc3a2 => 'a', 0xc3a3 => 'a', 0xc3a4 => 'a', 0xc3a5 => 'a', 0xc3a6 => 'ae', 0xc3a7 => 'c', 0xc3a8 => 'e', 0xc3a9 => 'e', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This file is part of the ICanBoogie package. | |
* | |
* (c) Olivier Laviale <olivier.laviale@gmail.com> | |
* | |
* For the full copyright and license information, please view the LICENSE | |
* file that was distributed with this source code. | |
*/ | |
namespace ICanBoogie; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.addEventListener | |
( | |
'load', function() | |
{ | |
var fileInput = document.getElementById('file-input'); | |
fileInput.addEventListener | |
( | |
'change', function(ev) | |
{ |
NewerOlder