< description

Notes, thoughts, failures. A blog.

< tags | sort -R | ಠ_ಠ
 
soyuka@soyuka.me ~/soyuka.me/

Fast fix diverged branches

You made a pull-request, but now some other changes got merged and branches have diverged. There’s a small tip I use to keep history while re-applying commits.


~400 Words

Rewrite an older commit with rebase and stash

You just commited some modifications, but there you’ve to edit things that are related to a previous commit, which isn’t the last one. So, instead of simply amending the commit, you need some more work to keep clean commits.


~300 Words
.Title

Optimize Web assets with Gulp

Images, css, javascript, fonts, we’re using a lot of things in today’s websites. Every time you add an asset <link>, <script>, @import, the browser will issue a request to fetch it. The number of requests that you’ll send might not matter compared to how heavy your ressources are.


~700 Words
.Title

Indexing hashes with a set in redis

Recently I was confronting a redis performance issue involving the following commands: keys scan multiple hgetall calls storing a json string in the hash (wtf) Clearly, I was doing everything wrong when I now take a look at my new solution. What’s weird is that it felt right when I first wrote the code. Maybe that this is because I was mind-stuck in a relational pattern instead of putting those aside and starting to think redis-only.…
~500 Words

Angular2 providers, view providers and "singletons"

The following is an illustration of how providers act through the angular application, or the components tree. You can control their action scope by using providers or viewProviders so that multiple sibling components share the same instance of that provider.