How to be more productive with Slack

Slack became a standard de-facto to communicate teams in IT area for sure. It has a lot of useful features as well as smart business decisions such HipHat acquisition.

Here is a nice article with seven points which help you to be more productive using Slack. My favorite tips are reminders and giphy. Plus ability to keep track of important messages.

Reminders are really excite. For example, to set reminder to notify you today at 12pm to come to the office just send this command to the slack bot:

/remind me to come to office today at 12pm

And Slack bot will send you notification today at 12pm. It’s also possible to set reminder for your colleague or channel as well as one time reminders or recurring ones.

Allow inline line breaks for Monolog

By default Monolog ignores line breaks inside debug message and puts it in one line. That’s fine for GrayLog or something similar but is not handy for me during local development. The fix is easy. Just add new Formatter with allowInlineLineBreaks option in true to your StreamHandler and enjoy formatted dumping of arrays:

$logger = new Monolog\Logger('MyLoggerName');
$formatter = new Monolog\Formatter\LineFormatter(
    null, // Format of message in log, default [%datetime%] %channel%.%level_name%: %message% %context% %extra%\n
    null, // Datetime format
    true, // allowInlineLineBreaks option, default false
    true  // ignoreEmptyContextAndExtra option, default false
);
$debugHandler = new Monolog\Handler\StreamHandler('/tmp/my_debug.log', Monolog\Logger::DEBUG);
$debugHandler->setFormatter($formatter);
$logger->pushHandler($debugHandler);

Fixing color issue in Fedora 26, Chrome and external monitor

If you use Chrome version 62 under Fedora 26 and realize the blue color becomes purple on your external monitor (laptop screen is fine) then welcome to the club! My first guessing was cable – changed it with the same result, then tried different monitors with different connection methods – VGA, HDMI, USB. No luck. Then I spent some time to check my video card, google similar problem. But suddenly I put Firefox to the same external monitor and found blue color as a blue!

So, card is fine, monitor and cable are fine too. The problem with some weird settings of Chrome. Using this Reddit thread I found solution:

  • Open new tab and type there chrome://flags
  • Find option “Force color profile” and set it to “sRGB”
  • Restart Chrome and enjoy blue as blue 🙂

Hide up/down arrows on inputs with type=”number”

HTML5 brought many cool things and input type number is one of them. It allows to input only numbers from the box and there is a way to specify limits for input values. However together with those useful features it has one annoying thing – up/down arrows on the right side, embedded into field. If you don’t like them just change field type to textinput and they disappear. But there is a more elegant way to hide them and the same time use all advantages of HTML5 number form input. Just add to your CSS file following code:

.no-spinners {
  -moz-appearance:textfield;
}
.no-spinners::-webkit-outer-spin-button,
.no-spinners::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

After that add class no-spinners to any number input you would like to see without up/down arrows.

From Cyprus to Lisbon

As you may know it’s a bit difficult to reach Lisbon from Cyprus. But combine two low cost airlines it’s possible to travel there without spending a lot of money. So, here is an example of the one possible route:

  • Flight from Paphos to Rome Ciampino with Ryanair – Thursday/Sunday morning. Day in Rome – warm up before Lisbon. Shuttle bus from Ciampino to Rome Termini Station about 40 minutes and 4EUR. Luggage can be left in the Termini. Express to Fiumicino – about 40 minutes and 14EUR.
  • Flight from Rome Fiumicino to Lisbon with EasyJet.
  • Flight to from Lisbon to Milan Malpensa with EasyJet. A shuttle bus to Milan Central Station 7.5EUR. You may stay night in Milan and spend next day there. But I suggest to go to fairytale city Bergamo.
  • Flight from Milan Bergamo to Pahos with Ryanair – Tuesday/Sunday at 19:35.

Another route a bit more complicated but I like it. The way to Lisbon is the same as above. But return back from Barcelona:

  • Flight from Lisbon to Madrid with EasyJet. Spend a few days there. Believe me, it’s really nice place.
  • Train from Madrid to Barcelona – 2.5 hours and ~35EUR. Spend a night in Barcelona.
  • Flight from Barcelona Girona to Paphos.

And finally, the 10 good points to go to Lisbon!

Budget way to go to Madrid from Cyprus

Budget, fast and fan way to get to Madrid, Sevilia or Valencia from Cyprus: flight from Paphos to Barcelona with Ryanair, shuttle bus to Barcelona Nord Bus Station and train from Barcelona Saints Train Station. Non-stop train to Madrid is just 2.5 hours and 37EUR one way! Better to buy it via Internet in advance.