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
/** | |
* (c) 2014 Anton Medvedev | |
* | |
* SELECT_________________ | |
* / \ \ | |
* .___ FROM JOIN | |
* / \ | / \ | |
* a city_name people address ON | |
* | | |
* =___________ |
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
/* | |
* Flyspeck is Dependency Injection Container. | |
* | |
* Copyright (c) 2014 Anton Medvedev | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is furnished |
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
$(function () { | |
$("pre").each(function() { | |
var pre = $(this); | |
// Not for this | |
if ( | |
pre.parents().hasClass('highlight') || | |
pre.parents().hasClass('gist') | |
) { | |
return; |
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 | |
$foo = new Foo(); | |
$foo->id = 1; | |
$foo->text = 'Hello'; | |
echo $foo->id; // 1 | |
echo $foo->text; // Hello World! |
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 | |
$c=' | |
<?php | |
$c=\'%s\'; | |
printf($c, addslashes($c));'; | |
printf($c, addslashes($c)); |
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 | |
/* (c) Anton Medvedev <[email protected]> | |
* | |
* For the full copyright and license information, please view the LICENSE | |
* file that was distributed with this source code. | |
*/ | |
namespace Entity; | |
use Doctrine\ORM\Mapping as ORM; |
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
exports.expect = expect = (json, pattern, throws = false, current = []) -> | |
condition = false | |
for own key, value of pattern | |
at = current.concat [key] | |
if typeof value is 'boolean' | |
condition = if value is true then json[key]? else not json[key]? | |
if not condition and throws | |
throw (if value is true then 'expected' else 'unexpected') + ' ' + at.join(' ') | |
else | |
if json[key]? |
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 | |
/** | |
* Dot notation for access multidimensional arrays. | |
* | |
* $dn = new DotNotation(['bar'=>['baz'=>['foo'=>true]]]); | |
* | |
* $value = $dn->get('bar.baz.foo'); // $value == true | |
* | |
* $dn->set('bar.baz.foo', false); // ['foo'=>false] | |
* |
NewerOlder