Skip to content

Instantly share code, notes, and snippets.

View Xerkus's full-sized avatar
:octocat:
Open Sourcing!

Aleksei Khudiakov Xerkus

:octocat:
Open Sourcing!
View GitHub Profile
@Xerkus
Xerkus / VendorNs\Silex\Provider\ViewServiceProvider.php
Created March 30, 2016 10:09
Extracted ZF2 view registartion for use in silex
<?php
namespace VendorNs\Silex\Provider;
use VendorNs\Silex\View;
use Silex\Application;
use Silex\ServiceProviderInterface;
use Zend\Form\View\HelperConfig as FormHelperConfig;
use Zend\View\Helper\FlashMessenger;
use Zend\View\Resolver as ViewResolver;
@Xerkus
Xerkus / bash_history.sh
Last active March 23, 2016 12:32
Bash completion from history using up and down arrows
export HISTSIZE=""
if [ "$PS1" ]; then
bind '"\e[A":history-search-backward'
bind '"\e[B":history-search-forward'
fi
@Xerkus
Xerkus / Dockerfile
Last active February 2, 2016 13:07
Docker image to get vim up and running
FROM fedora:23
MAINTAINER Xerkus
RUN dnf -y upgrade && dnf clean all
RUN dnf -y install \
vim \
vim-enhanced \
git \
&& dnf clean all
let g:vdebug_options= {"marker_default": '◇'}
let g:vdebug_options= {"port": '9006'}
let g:vdebug_features= {'max_data': 50000, 'max_depth': 2, 'max_children': 128}
---
- name: Test
hosts: 127.0.0.1
connection: local
gather_facts: no
vars:
- modules: ['--with-http_image_filter_module', '--with-http_xslt_module']
- recompile: false
tasks:
@Xerkus
Xerkus / test.php
Last active December 28, 2015 21:09
Simple test to prove garbage collector does not detect circular reference if SPL object is used.
<?php
gc_enable();
class test
{
public $spl;
public function __construct()
{
@Xerkus
Xerkus / example.php
Created November 15, 2012 17:50 — forked from ralphschindler/example.php
Zend\Db\Sql\Select example usage
<?php
use Zend\Db\Sql\Select;
// basic table
$select0 = new Select;
$select0->from('foo');
// 'SELECT "foo".* FROM "foo"';
[Xerkus@xerkus-laptop zf2 (master)]$ git request-pull origin/master zendframework zendframework/master
The following changes since commit ef6320a48cfe3dbdf28421a78f007e2b304c9fc7:
Merge branch 'hotfix/2889' (2012-11-05 09:18:52 -0600)
are available in the git repository at:
https://github.com/zendframework/zf2.git master
@Xerkus
Xerkus / dirtree.html
Created September 30, 2012 19:32
Quick peek into dojo by example. Directory tree listing using cli command "tree" output in xml format as data source. Needs styling, code cleanup and improvements. May be i'll get back to it later.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>file tree</title>
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/dojo/1.8.0/dijit/themes/claro/claro.css">
<style>
.fileIconPhp {background: url('https://raw.github.com/teambox/Free-file-icons/master/16px/php.png') top left}
</style>
<script src="//ajax.googleapis.com/ajax/libs/dojo/1.8.0/dojo/dojo.js"></script>