Skip to content

Instantly share code, notes, and snippets.

🤓
happy developer

Alexander Hutorezki olekhy

🤓
happy developer
  • Berlin, Germany
Block or report user

Report or block olekhy

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 gist:2775083
<?php
/**
* (non-PHPdoc)
* @see FilterIterator::accept()
*/
public function accept()
{
/* @var $file SplFileInfo */
$file = $this->current();
if ($this->isHidden($file->getFilename())) {
View gist:2775102
<?php
/**
* (non-PHPdoc)
* @see FilterIterator::accept()
*/
public function accept()
{
/* @var $file SplFileInfo */
$file = $this->current();
View gist:2815620
public class WhoMayUsePrivate
{
public static void main( String[] args )
{
DiskoVergleicher m = new DiskoVergleicher();
System.out.println( m.compare( new DiskoVergleicher() ) );
}
}
class DiskoVergleicher
{
View awesome-php.md

Awesome PHP Libraries

A list of amazingly awesome PHP libraries that you should consider using (and some other shiny extras).

View not_unicue_values_thow_exception.php
<?php
/**
* This file is part of me
*
* @author Oleksandr Khutoretskyy <olekhy@gmail.com>
* Date: 9/9/13
* Time: 11:30 PM
* @license MIT
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
@olekhy
olekhy / vagrant.provision.debug.log
Created May 21, 2014
vagrant.provision.debug.log
View vagrant.provision.debug.log
This file has been truncated, but you can view the full file.
INFO global: Vagrant version: 1.4.1
INFO global: Ruby version: 2.0.0
INFO global: RubyGems version: 2.0.14
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/opt/vagrant/bin/../embedded"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_BOX_ENVIRONMENT="external"
INFO global: VAGRANT_DETECTED_OS="Linux"
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_LOG="debug"
View vagrant.debug.log
This file has been truncated, but you can view the full file.
INFO global: Vagrant version: 1.4.1
INFO global: Ruby version: 2.0.0
INFO global: RubyGems version: 2.0.14
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/opt/vagrant/bin/../embedded"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_BOX_ENVIRONMENT="external"
INFO global: VAGRANT_DETECTED_OS="Linux"
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_LOG="debug"
@olekhy
olekhy / loader.php
Last active Aug 29, 2015
services loader w/o instanciate via NEW keyword
View loader.php
<?php
abstract class AbstractService
{
protected $options;
final protected function __construct($options)
{
$this->options = $options;
}
@olekhy
olekhy / gist:e0735a82449436db5c8e
Created Sep 16, 2014
perfomance testing for generation unique id from string smaller than 1000 chars
View gist:e0735a82449436db5c8e
I've take an simple test for get sure what is the best basic case for this
Firstly my timing result:
```shell
% (php /tmp/testmd5.php); (php /tmp/testsha1.php); (php /tmp/teststr_replace.php); (php /tmp/teststrtr.php);
11.715120792389( php /tmp/testmd5.php; ) 11,73s user 0,01s system 99% cpu 11,750 total
13.626849889755( php /tmp/testsha1.php; ) 13,65s user 0,00s system 99% cpu 13,653 total
16.591732978821( php /tmp/teststr_replace.php; ) 16,60s user 0,02s system 99% cpu 16,627 total
87.248502969742( php /tmp/teststrtr.php; ) 87,24s user 0,01s system 99% cpu 1:27,28 total
View ubuntu-compass-ruby
#https://gorails.com/setup/ubuntu/14.04
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
curl -L https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc
rvm install 2.1.2
rvm use 2.1.2 --default
You can’t perform that action at this time.