Skip to content

Instantly share code, notes, and snippets.

View shizzard's full-sized avatar

Denis Fakhrtdinov shizzard

View GitHub Profile
@shizzard
shizzard / books
Last active August 29, 2015 14:00
Books
http://www.amazon.com/Hadoop-Definitive-Guide-Tom-White/dp/1449311520/
http://www.amazon.com/Compilers-Principles-Techniques-Alfred-Aho/dp/0201100886/
http://www.amazon.com/G%C3%B6del-Escher-Bach-Eternal-Golden/dp/0465026567/
http://www.amazon.com/Programming-Pearls-2nd-Jon-Bentley/dp/0201657880/
http://www.amazon.com/Working-Effectively-Legacy-Michael-Feathers/dp/0131177052/
http://www.amazon.com/Programming-Environment-Addison-Wesley-Professional-Computing/dp/0321637739/
http://www.amazon.com/Test-Driven-Development-Kent-Beck/dp/0321146530/
http://www.amazon.com/Practices-Agile-Developer-Pragmatic-Bookshelf/dp/097451408X/
http://www.amazon.com/Design-Everyday-Things-Revised-Expanded/dp/0465050654/
http://www.amazon.com/Pragmatic-Thinking-Learning-Refactor-Programmers/dp/1934356050/
INFO global: Vagrant version: 1.6.2
INFO global: Ruby version: 2.0.0
INFO global: RubyGems version: 2.0.14
INFO global: VAGRANT_DEFAULT_PROVIDER="parallels"
INFO global: VAGRANT_EXECUTABLE="/Applications/Vagrant/bin/../embedded/gems/gems/vagrant-1.6.2/bin/vagrant"
INFO global: VAGRANT_LOG="debug"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/Applications/Vagrant/bin/../embedded"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_DETECTED_OS="Darwin"
INFO global: VAGRANT_INSTALLER_ENV="1"
2014-08-21 13:07:35 <0.227.1> [c] <?xml version='1.0' ?><stream:stream to='admin.localhost' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>
2014-08-21 13:07:35 <0.227.1> [s] <?xml version='1.0'?><stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' from='admin.localhost' version='1.0' >
2014-08-21 13:07:35 <0.227.1> [s] <stream:features><mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><mechanism><![CDATA[PLAIN]]></mechanism></mechanisms></stream:features>
2014-08-21 13:07:35 <0.227.1> [c] <auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN' xmlns:ga='http://www.google.com/talk/protocol/auth' ga:client-uses-full-bind-result='true'>AGFkbWluLTEAZDUwODVmMmM5ZA==</auth>
2014-08-21 13:07:35 <0.227.1> [s] <success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
2014-08-21 13:07:35 <0.227.1> [c] <stream:stream to='admin.localhost' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>
2014-08-21 13:07:35
2014-08-21 09:48:32 <0.19122.49> [c] <?xml version='1.0' ?><stream:stream to='wotqa706.loc' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' xml:lang='en' version='1.0'>
2014-08-21 09:48:32 <0.19122.49> [s] <?xml version='1.0'?><stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' from='wotqa706.loc' version='1.0' >
2014-08-21 09:48:32 <0.19122.49> [s] <stream:features><mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><mechanism><![CDATA[PLAIN]]></mechanism></mechanisms></stream:features>
2014-08-21 09:48:33 <0.19122.49> [c] <auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>APIwMTEAMTc0NDUxMw==</auth>
2014-08-21 09:48:34 <0.19122.49> [s] <success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
2014-08-21 09:48:34 <0.19122.49> [c] <?xml version='1.0' ?><stream:stream to='wotqa706.loc' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' xml:lang='en' version='1.0'>
2014-08-21 09:48:34 <0.19122.49> [s] <?xml version='1.0'
resolve_family({_,_,_,_}, auto) ->
inet;
resolve_family({_,_,_,_,_,_,_,_}, auto) ->
inet6;
resolve_family(IP, auto) ->
throw({error, {strange_family, IP}});
resolve_family(_, F) ->
@shizzard
shizzard / gist:1280920
Created October 12, 2011 10:57
UTC time zones names
protected $_UtcNames = array(
'UTC-12' => 'Yankee',
'UTC-11' => 'X-Ray',
'UTC-10' => 'Whiskey',
'UTC-9' => 'Victor',
'UTC-8' => 'Uniform',
'UTC-7' => 'Tango',
'UTC-6' => 'Sierra',
'UTC-5' => 'Romeo',
'UTC-4' => 'Quebec',
@shizzard
shizzard / gist:3706867
Created September 12, 2012 14:11
test loop
-module(test_loop).
-export([start_link/0, init/0]).
-record(
state,
{
status = free :: free | busy
}
).
get_handler(Binary, AccountId, Uid) ->
try decode(Binary) of
{ok, Type, Priority, {M, F, A}} ->
{ok, Type, Priority, {M, F, A ++ [AccountId, Uid]}}
catch
error:Error ->
?ERROR("tpf_eva decoder reports bad binary input: ~p", [Error]),
{error, Error};
exit:{error, Why} ->
?ERROR("tpf_eva decoder reports ~p", [Why]),
Specs = [
{name, fun
(Data) when is_list(Data) -> ok;
(Data) -> {error, not_list}
end},
{age, fun
(Data) when is_integer(Data) -> ok;
(Data) -> {error, not_integer}
end}
],
-module(gen_tpf_eva_handler).
-export([get_module_name/3]).
-callback major_version() ->
integer().
-callback minor_version() ->
integer().
-callback handle(binary()) ->
ok | {error, any()}.