Skip to content

Instantly share code, notes, and snippets.

View lezhnev74's full-sized avatar
🐘
Eating the elephant in pieces

Dmitry Lezhnev lezhnev74

🐘
Eating the elephant in pieces
View GitHub Profile
@mnapoli
mnapoli / DI containers summary.md
Last active May 7, 2018 07:58
DI containers usage comparison
@esatemre
esatemre / elastic.js
Created October 23, 2015 10:43
ElasticSearch Support for jQuery-QueryBuilder
*!
* jQuery QueryBuilder ElasticSearch Filter Support
* Allows to convert exported rules as a ElasticSearch filter query object.
* Copyright 2015 Esat Emre Demirel (http://blog.esatemre.com)
*/
function getRawFilter(data) {
var hede = parse(data);
return JSON.stringify(hede);
}
function parse(data) {
@mako34
mako34 / PHP_push_iOS.php
Last active May 3, 2020 13:04
PHP test for iOS push notification
<?php
// Provide the Host Information.
$tHost = 'gateway.sandbox.push.apple.com';
$tPort = 2195;
// Provide the Certificate and Key Data.
@nikic
nikic / php_evaluation_order.md
Last active October 19, 2021 05:47
Analysis of some weird evaluation order in PHP

Order of evaluation in PHP

Yesterday I found some people on my [favorite reddit][lolphp] wonder about the output of the following code:

<?php

$a = 1;
$c = $a + $a++;
@barryvdh
barryvdh / .phpstorm.meta.php
Last active October 20, 2021 22:16
Laravel PhpStorm Meta file
<?php
namespace PHPSTORM_META {
/**
* PhpStorm Meta file, to provide autocomplete information for PhpStorm
* Generated on 2017-09-28.
*
* @author Barry vd. Heuvel <barryvdh@gmail.com>
* @see https://github.com/barryvdh/laravel-ide-helper
*/
@pokap
pokap / assertArraySimilar.php
Last active August 9, 2022 15:08
[PHPunit] assert two arrays are equal, but ignore orders
<?php
trait ArrayTestCaseTrait
{
/**
* Asserts that two associative arrays are similar.
*
* Both arrays must have the same indexes with identical values
* without respect to key ordering
*
@Akimkin
Akimkin / tzlist.php
Last active December 8, 2022 08:46
Get list of timezones translated to given language in PHP
<?php
/**
* Get list of timezones translated in given language
*
* Requires PHP Intl extension to be present & active in your PHP setup
*
* @param string $langcode - an ISO 639-1 language code
* @return array
*/
http://stackoverflow.com/questions/19386962/laravel-eloquent-and-complex-relationships?rq=1
http://forumsarchive.laravel.io/viewtopic.php?pid=21255
http://stackoverflow.com/questions/20666490/laravel-4-mssql-stored-procedure-with-parameters-as-a-prepared-statements
http://culttt.com/2013/08/05/extending-eloquent-in-laravel-4/
http://www.blogosfera.co.uk/2013/08/pass-parameters-in-insert-query-stored-procedure-in-laravel-4/