Code

Array helpers #1

Just some random (relevance wise) functions for array manipulations. /** * Combines a new array using initial array even values * as keys and odd as their values * * @param array $initial * @param callable $key_callback Applied on keys * @param callable $value_callback Applied on values * @return array */ function arrayCombineFromValues( array $initial, callable $key_callback = null, callable $value_callback = null ) { $values = array_values($initial); $combined = array(); for ($i = 0; $i < count($values); $i += 2) { $key = $key_callback ? $key_callback($values[$i]) : $values[$i]; $val...

Browser as a tool

A developer in a small company - how often do you get a weird request to do something totally unrelated to writing code just because you seem to be the only efficient and able person to handle that situation? Luckily most of those oddballs still are inclined to involve a computer and as soon as a part of the task starts to sound as repetitive or ... (with a surprise) even complicated and interesting - you can most likely conjure up a justification to write a tool to do it for you. And then you are once again back at writing code and feeling less overpaid and/or undervalued. Why write a Chrome plugin? Because ES5 is fun and not having to worry even think about compatibility a...

InjectCode

A Chrome extension for developers who have to deal with sites to which they don't have code side access to. Easily store and inject JavaScript snippets into pages, enhance usability or manipulate data in several open tabs at once. Version 1.0.0 create, edit, delete, sort, name and enable/disable your scripts syntax highlighter and autosave scripts are stored locally and persist throughout sessions run a specific script or all that are marked as active change scope to run scripts on the current or on all open tabs scripts are injected into the pages after document.ready includes jQuery added global function openTab(url) to open a new tab within your script (avoid re...

Sloppy complex
shapes and shadows

Aka why I got fed up with fiddling with the frontend part of this site. This one is not for the answers section - rather pretty much the opposite. Since It's a personal project and the other option would have been delayed shipping I let loose the standards I have for my code. This is a short description of where I wanted to go with the top-right-corner-menu design and which (bad) steps I took to bring it to life. If you happen to know how to achieve the following with just neat and tidy html/css please do enlighten me :D.   Appearance The first image shows how far I got with minor hacks and the second one a photoshopped versi...