Over the past few years I have been participating in Stand-up meetings and it took me some time to find a convenient and effective way for keeping notes about what I was doing every day. I needed to be able to: keep notes on the issues I worked on, the meetings I participated in and stuff that blocked my work easily access these notes based on their date have an overview of what I did for example…
Yesterday I saw a great command that finds the palindrome dates between now and x days ago. The command was posted on Twitter by @climagic (a great account to follow if you want to find awesome command line stuff). In this post we are going to break it down and explain how it works. What is a palindrome Palindrome is a word/number/phrase or other sequence of characters that reads the same backward…
On Monday I had to put my beloved cat, Irida, to sleep. Who is Irida Twelve years ago, I wanted to get a pet. My friends helped me find one via a post about a stray young cat which was found under a truck in my area. After two days the cat was in my house and that's how one my most beloved beings came into my life. I was thinking of names and I ended up naming her "Irida" (which is a variation of…
Roses are red Violets are blue I have stuck in vim And so have you. Vim ain't for newbies But I'm a curious soul So I went down That shell rabbit hole. I tried to edit hosts Everything went wrong The file remained open For two hours long. When I found the magic Semicolon double-u q The file was readonly You've been there too. The bells started ringing As I control led + c What was I thinking I…
Roses are red Violets are blue I was looping forever And then I found you. i was your name I think j was next to you Born inside a for Died in there too. I saw you getting bigger Loop over loop over loop And j was getting smaller You were a great group. And then you just vanished You left me there alone Condition wasn't true At least nothing was thrown.
I recently faced some issues when trying to update a nested document’s type via nested attributes using the mongoid gem. Bare with me if this sentence doesn’t make any sense yet. Use case Suppose we have a document named Person that embeds a document that can be any of the types Book or BoardGame which inherit from the class Item . Item class Item include Mongoid :: Document embedded_in :person ,…
This cat has been in my life for 12 years now. Whenever I get back home and sit on the sofa, she jumps on my chest and starts licking my nose and my eyebrows. She stays there until the moment she realizes I could be feeding her instead of relaxing.
After painting the meadow with acrylic colors , I bought oil colors which are the ones Bob Ross uses in “The joy of painting” show. This time I followed the episode 10 from season 13 of the show, called “Mountain Summit” . I am very satisfied by the outcome but being a beginner, I faced a lot of difficulties and the painting has a number of errors. Facts I used the wet-on-wet technique oil colors…
I have always liked painting but I had never devoted any time to this hobby. I was painting once every 2 or more years but with dissappointing results. Few days ago I tried to create a painting of my cat and I enjoyed both the process and the result. I decided to pursue this hobby and yesterday, I followed an episode of Bob Ross’ show “The joy of painting” (most if not all episodes are available…
On Saturday I felt like drawing and (no surprises here) I decided to create a painting of my cat. Without further ado, this is the result. At the top center and right section of the photo you may notice the paws of my cat which was present during the whole process and which actually is responsible for some of the inconsistencies of the painting (blaming the cat) . Imagine a cat having a moving…
Email communication is not my favorite but since I can’t avoid it, I am trying to compose messages in a way that I think it makes it easier for both me and the recipient: to quickly address what is being communicated avoid misunderstandings save time Here are some tips. They don’t apply to all type of messages, I provide before and after examples to better describe each case. Emphasize text with…
Suppose you have a text file and you need to remove all of its duplicate lines. TL;DR To remove the duplicate lines preserving their order in the file use: awk '!visited[$0]++' your_file > deduplicated_file How it works The script keeps an associative array with indices equal to the unique lines of the file and values equal to their occurrences. For each line of the file, if the line occurrences…
In this post we are going to manage nested objects of a document indexed with Elasticsearch. The nested type is a specialised version of the object datatype that allows arrays of objects to be indexed in a way that they can be queried independently of each other. – Nested datatype - Official Elasticsearch reference Prerequisites To follow this post you need: an up and running Elasticsearch…
I use the terminal a lot and in my day to day work I tend to navigate to the same bunch of directories. There are some awesome tools out there (like autojump or z ) but sometimes, especially when the directories are similarly named, there is a need to be explicit to navigate to the proper one. I decided to write a script to overcome this issue and to avoid having to edit my .bash* files to manage…
Hey! In this post we are going to: create a docker image for the Rails chat application that we created in the previous post configure the Docker environment and run the application by: creating a container for the PostgreSQL database creating a container for the Redis server creating a container with the required configuration from the image we built Prerequisites Install docker The first thing…
Hey! It’s been a while since my last post. I recently familiarized myself with the awesomeness of WebSockets and I finally found the time to write a tutorial about it. I hope you find it helpful. Update : I also published another post for dockerizing the application of this tutorial, you can find it here . Introduction In this tutorial we are going to create a chat web application from scratch…