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 / 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 / winswitch.pl
Created August 31, 2014 13:37
IRSSI script to allow to switch between windows using /<number>
sub cmd_winswitch {
my ($data, $server, $witem) = @_;
if ($data =~ /^\/([0-9]+)$/) {
$server->command("win " . $1);
Irssi::signal_stop();
}
}
Irssi::signal_add_first('send command', 'cmd_winswitch');
@Xerkus
Xerkus / task.yml
Created June 10, 2014 18:20 — forked from maxim/task.yml
- name: ensure postgresql hstore extension is created
sudo: yes
sudo_user: postgres
shell: "psql {{ postgresql_database }} -c 'CREATE EXTENSION hstore;'"
register: psql_result
failed_when: >
psql_result.rc != 0 and ("already exists" not in psql_result.stderr)
changed_when: "psql_result.rc == 0"
[remote "zendframework"]
url = git@github.com:zendframework/zf2.git
fetch = +refs/heads/*:refs/remotes/zendframework/*
fetch = +refs/pull/*/head:refs/remotes/zendframework/pr/*
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