Skip to content

Instantly share code, notes, and snippets.

View amcsi's full-sized avatar
🏠
Working from home

Attila Szeremi amcsi

🏠
Working from home
View GitHub Profile
@amcsi
amcsi / Person.php
Last active August 29, 2015 13:59
Immutable value object
<?php
namespace MyProject;
class Person
{
private $data;
/**
*
* [
@amcsi
amcsi / .tmux.conf
Created April 17, 2014 11:05
My .tmux.conf
# http://www.doknowevil.net/2010/10/18/sorry-screen-tmux-is-better-but-here-are-some-screen-lik-hotkeys/
unbind C-b
set -g prefix C-a
bind-key a send-prefix
# other ^A
unbind ^A
bind ^A last-window
@amcsi
amcsi / vimrc
Created April 9, 2014 16:09
vim-submode next/prev method
" ]m -> mmmm (next method) MMMM (prev method)
call submode#enter_with('nextMethod', 'n', '', ']m', ']m')
call submode#leave_with('nextMethod', 'n', '', '<Esc>')
call submode#map('nextMethod', 'n', '', 'm', ']m')
call submode#map('nextMethod', 'n', '', 'M', '[m')
" [m -> mmmm (prev method) MMMM (next method)
call submode#enter_with('prevMethod', 'n', '', '[m', ']m')
call submode#leave_with('prevMethod', 'n', '', '<Esc>')
call submode#map('prevMethod', 'n', '', 'm', '[m')
@amcsi
amcsi / pthreads.php
Created April 8, 2014 21:46
Pthreads sleep() experiment
<?php
class MyThread extends Thread
{
public function run()
{
sleep(1);
echo "ran\n";
}
}