Skip to content

Instantly share code, notes, and snippets.

Krzysztof Bednarczyk bordeux

Block or report user

Report or block bordeux

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View simple.xml
<?xml version="1.0"?>
<ruleset name="TourRadar">
<rule ref="PSR1" />
<rule ref="PSR2" />
<rule ref="PSR12" />
<rule ref="Generic.PHP.ForbiddenFunctions">
<properties>
<property name="forbiddenFunctions" type="array" value="sizeof=>count,delete=>unset,print=>null,echo=>null,is_null=>null,create_function=>null,var_dump=>null,eval=>null"/>
@bordeux
bordeux / Country-to-currency.php
Created Apr 25, 2018
Country ISO to currency
View Country-to-currency.php
<?php
return [
'AF' => 'AFN',
'AL' => 'ALL',
'DZ' => 'DZD',
'AS' => 'USD',
'AD' => 'EUR',
'AO' => 'AOA',
'AI' => 'XCD',
'AQ' => 'XCD',
@bordeux
bordeux / returntrue.win
Last active Feb 20, 2018
Solutions to returntrue.win
View returntrue.win
1. !0
2. function(){return 'true';}
3. !0
4. 0
5. 𪒧
6. $GLOBALS[v] = create_function('', 'return $GLOBALS[v];')
7. (object)[!0]
8. new class extends Bar{}
9. N //or NaN (if you do not like errors)
10. function(&$x){$x=new Bar(1);}
@bordeux
bordeux / CloudWatchFormatter.php
Created Jan 4, 2018
CloudWatchFormatter for Monolog
View CloudWatchFormatter.php
<?php
namespace YourBundle\OwnNamespace\Monolog\Formatter;
use Monolog\Formatter\NormalizerFormatter;
/**
* Class CloudWatchFormatter
* @author Chris Bednarczyk <bordeux>
* @package YourBundle\OwnNamespace\Monolog\Formatter
@bordeux
bordeux / cronox.js
Last active Sep 6, 2017
Cronox killer
View cronox.js
var hehe = function(){
function uniqueArray(minRange, maxRange, arrayLength) {
var arrayLength = (arrayLength) ? arrayLength : 10
var minRange = (minRange !== undefined) ? minRange : 1
var maxRange = (maxRange !== undefined) ? maxRange : 100
var numberOfItemsInArray = 0
var hash = {}
var array = []
View getString.js
var utils = {};
utils.getString = function (func) {
var result = func();
if (typeof result !== "undefined") {
return result;
}
var re = /<string[^>]*>([\s\S]*?)<\/string>/ig;
View structure.sql
-- phpMyAdmin SQL Dump
-- version 4.1.6
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jun 28, 2014 at 06:05 PM
-- Server version: 5.5.34-0ubuntu0.13.04.1
-- PHP Version: 5.5.13-2+deb.sury.org~precise+1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
You can’t perform that action at this time.