Skip to content

Instantly share code, notes, and snippets.

View kandy's full-sized avatar

Andrii Kasian kandy

View GitHub Profile
sudo -i
# Make sure the prerequisites are installed.
apt-get -y install autoconf automake curl build-essential libxslt1-dev re2c libxml2-dev
# Install PHP 5 dependencies.
apt-get -y build-dep php5
# Download phpbrew
cd /usr/bin
curl -O https://raw.github.com/c9s/phpbrew/master/phpbrew
# Make phpbrew executable.
chmod +x phpbrew
@kandy
kandy / afp.conf
Created January 7, 2014 18:18 — forked from oscarcck/afp.conf
;
; Netatalk 3.x configuration file
; http://netatalk.sourceforge.net/3.0/htmldocs/afp.conf.5.html
;
[Global]
; Global server settings
vol preset = default_for_all_vol
log file = /var/log/netatalk.log
uam list = uams_dhx.so,uams_dhx2.so
<?php
/**
* @link http://stackoverflow.com/questions/13865149/speeding-up-xml-schema-validations-of-a-batch-of-xml-files-against-the-same-xml
*/
$mapping = [
'http://www.w3.org/2002/08/xhtml/xhtml1-transitional.xsd' => 'schema/xhtml1-transitional.xsd',
'http://www.w3.org/2001/xml.xsd' => 'schema/xml.xsd',
];
[fredemmott@devbig076 ~/fbcode/hphp/test] ./run slow/autoload/trait.php
Running 1 tests in 1 threads (0 in serial)
All tests passed.
| | |
)_) )_) )_)
)___))___))___)\
)____)____)_____)\
_____|____|____|____\\__
---------\ SHIP IT /---------
{
"blocks":{
"sales_order_grid":110,
"sales_order_view":67,
"html_head":55,
"comment":51,
"catalog_product_grid":38,
"product_view":34,
"onepage":32,
"onepage_payment_methods":30,
@kandy
kandy / 00. tutorial.md
Last active August 28, 2015 07:13 — forked from maxivak/00. tutorial.md
Importing/Indexing database (MySQL or SQL Server) in Solr using Data Import Handler
@kandy
kandy / gist:1466343a2739a5e3b647
Created November 6, 2015 12:32 — forked from sprankhub/gist:a386a2969ca7cc6f6552
Fish Shell Autocompletion for the Magento 2 Shell Script
# Installation:
# Copy to ~/.config/fish/completions/magento.fish
# Open new or restart existing shell session
# Commands based on Magento 2.0.0-rc and the command
# bin/magento --raw --no-ansi list
# It is a static list since you probably do not have the magento shell script
# in your path.
complete -f -c magento -a --help;
complete -f -c magento -a -h;
@kandy
kandy / m2-module-install-2.sh
Created November 21, 2015 12:33 — forked from davidalger/m2-module-install-2.sh
Install module directly or via composer
composer config repositories.alger/phpworld-talk2 vcs [email protected]:davidalger/phpworld-talk2.git
composer require alger/module-skeleton:dev-master
bin/magento setup:upgrade -q && bin/magento cache:flush -q
# OR
git clone [email protected]:davidalger/phpworld-talk2.git app/code/Alger/Skeleton
bin/magento module:enable Alger_Skeleton
bin/magento setup:upgrade -q && bin/magento cache:flush -q
@kandy
kandy / Random bytes, ints, UUIDs in PHP.md
Created February 1, 2016 14:21 — forked from tom--/Random bytes, ints, UUIDs in PHP.md
PHP random bytes, integers and UUIDs

Random bytes, ints, UUIDs in PHP

Simple and safe random getters to copy-paste

string randomBytes( int $length )

int randomInt ( int $min , int $max )

string randomUuid ( void )
@kandy
kandy / sql_profiling.php
Created May 12, 2017 10:18 — forked from mslabko/sql_profiling.php
Enable sql profiling for Magento2
<?php
/**
* Enable sql profiling for each page.
*
* Put code to index file in two parts
*/
// place it BEFORE application run
$profiler = \Magento\Framework\App\ObjectManager::getInstance()
->get('Magento\Framework\App\ResourceConnection')