Skip to content

Instantly share code, notes, and snippets.

View dzentota's full-sized avatar

Alexandr Tatulchenkov dzentota

View GitHub Profile
@dzentota
dzentota / format-stmt.php
Created March 25, 2019 10:52 — forked from morozov/format-stmt.php
Prepared Statements Debugging Snippets
<?php
function format_sugar_query(SugarQuery $query)
{
return format_builder(
$query->compile()
);
}
function format_builder(\Doctrine\DBAL\Query\QueryBuilder $builder)
@dzentota
dzentota / unmerged.php
Last active July 15, 2019 08:22
Get list of unmerged branches/commits
#!/usr/bin/env php
<?php
error_reporting(E_ALL);
ini_set('display_errors',1);
$token = '<your github token>';
$username = '<your github username>';
function query($condition)
@dzentota
dzentota / ItemName.php
Last active April 19, 2020 20:12
ItemName.php
<?php
declare(strict_types=1);
final class ItemName
{
private $value;
private function __contruct()
{}
@dzentota
dzentota / xss.html
Last active December 15, 2020 10:19
xss
<html>
<head>
<script>
parent.window.location.href = 'https://www.salesforce.com';
</script>
</head>
</html>
@dzentota
dzentota / client.php
Last active May 18, 2022 13:12
Curl vs ExternalResourceClient
<?php
use Sugarcrm\Sugarcrm\Security\HttpClient\ExternalResourceClient;
use Sugarcrm\Sugarcrm\Security\HttpClient\RequestException;
require 'vendor/autoload.php';
$ch = curl_init();
$url = 'https://httpbin.org/get';