<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> <channel><title>Goran Rakić</title> <description></description> <atom:link href="http://blog.goranrakic.com/english/index.xml" rev="self" type="application/rss+xml"/> <atom:link href="http://blog.goranrakic.com//.html"/> <pubDate>Tue, 09 Aug 2016 21:31:30 +0200</pubDate> <lastBuildDate>Tue, 09 Aug 2016 21:31:30 +0200</lastBuildDate> <id>http://blog.goranrakic.com//.html</id> <item><title>Definitely a must see design</title> <description>&lt;p&gt;&lt;a href="http://csszengarden.com/?cssfile=http://www.brucelawson.co.uk/zen/sample.css"&gt;Geocites 1996 style&lt;/a&gt; for CSS Zen Garden by Bruce Lawson. Read more on &lt;a href="http://brucelawson.co.uk/index.php/2004/zengarden/"&gt;this blog post from 2004.&lt;/a&gt;&lt;/p&gt; </description> <pubDate>Sun, 17 Sep 2006 13:32:16 +0200</pubDate><link>http://blog.goranrakic.com/2006/09/definitely_a_must_see_design.html</link> <guid isPermaLink="true">http://blog.goranrakic.com/2006/09/definitely_a_must_see_design.html</guid> </item> <item><title>Things I would like to see in F-Spot</title> <description>&lt;p&gt;I read “&lt;a href="http://grail.cs.washington.edu/projects/photomontage/"&gt;Interactive Digital Photomontage&lt;/a&gt;” paper today, and I think that it is freaking amazing:&lt;/p&gt;&lt;blockquote&gt;We describe an interactive, computer-assisted framework for combining parts of a set of photographs into a single composite picture, a process we call "digital photomontage."&lt;/blockquote&gt;&lt;p&gt;As I can see, there exists an implementation in C++, released under GNU GPL, I don’t have any clues how much effort it would take to have this feature enabled in F-spot but I believe it can be major reason for one to switch to it.&lt;/p&gt;&lt;p&gt;Also, I do like how Aperture can group stack frames, and unfold them only on request. Support for linked RAW files (stored on external removable media) is also very nice, but as I am not professional photographer, that’s not important to me.&lt;/p&gt;&lt;p&gt;On the other hand, it would be nice to have some support for importing photos from iPhoto (and Aperture). I read once about some Perl script that can do that, but I can’t find it right now.&lt;/p&gt; </description> <pubDate>Sun, 18 Feb 2007 23:51:33 +0100</pubDate><link>http://blog.goranrakic.com/2007/02/things_i_would_like_to_see_in_fspot.html</link> <guid isPermaLink="true">http://blog.goranrakic.com/2007/02/things_i_would_like_to_see_in_fspot.html</guid> </item> <item><title>Close gedit window when last tab is closed</title> <description>&lt;p&gt;I am using gedit quite a lot. It’s reasonably fast and it provides some nice functionality via &lt;a href="http://live.gnome.org/Gedit/Plugins"&gt;plugins&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;But I don’t like that gedit window stays open even when there are no tabs. I know that it’s a feature, and that there is a CTRL+Q for closing gedit, it’s just that I would like to use CTRL+W all the time.&lt;/p&gt;&lt;p&gt;Some time ago I patched gedit, but today I realized it’s better to write this as a plugin so I can use standard package from Ubuntu and not have to rebuilt it by myself.&lt;/p&gt;&lt;p&gt;So, here it is — &lt;a href="http://blog.goranrakic.com/uploads/gedit-tabclose-1.0.tar.gz"&gt;gedit tabclose plugin&lt;/a&gt;, version 1.0. README and INSTALL files are in the archive.&lt;/p&gt; </description> <pubDate>Mon, 01 Oct 2007 14:29:55 +0200</pubDate><link>http://blog.goranrakic.com/2007/10/close_gedit_window_when_last_tab_is_closed.html</link> <guid isPermaLink="true">http://blog.goranrakic.com/2007/10/close_gedit_window_when_last_tab_is_closed.html</guid> </item> <item><title>USB, Virtualbox and Ubuntu Lucid</title> <description>&lt;p&gt;Ubuntu Lucid has removed hal support which is required for (proprietary) Oracle VirtualBox to use local USB devices inside your VM. Until VirtualBox is eventually ported to the hal-less world you can start hal daemon before running VirtualBox as a workaround.&lt;/p&gt;&lt;p&gt;The solution is to get closed source free for evaluation and personal usage version of Oracle VirtualBox (you can use the package from the karmic repository), add yourself to the vboxusers group (if not already) and start hald in no daemon mode: &lt;tt&gt;&lt;b&gt;sudo hald –daemon=no&lt;/b&gt;&lt;/tt&gt;.&lt;/p&gt;&lt;p&gt;Use &lt;tt&gt;&lt;b&gt;lsusb -v&lt;/b&gt;&lt;/tt&gt; to get vendor/product ids if you would like to setup a filter inside VM USB controller properties so your local device can be auto connected when the VM starts.&lt;/p&gt; </description> <pubDate>Fri, 30 Apr 2010 21:05:52 +0200</pubDate><link>http://blog.goranrakic.com/2010/04/usb_virtualbox_and_ubuntu_lucid.html</link> <guid isPermaLink="true">http://blog.goranrakic.com/2010/04/usb_virtualbox_and_ubuntu_lucid.html</guid> </item> <item><title>Put the fun back in writing templates</title> <description>&lt;style&gt; .blogbody ul.dense li { margin-top: 5px; } &lt;/style&gt; &lt;ul class="dense"&gt; &lt;li&gt;&lt;a href="http://www.workingsoftware.com.au/page/Your_templating_engine_sucks_and_everything_you_have_ever_written_is_spaghetti_code_yes_you"&gt;Your templating engine sucks and everything you have ever written is spaghetti code (yes, you)&lt;/a&gt;&lt;li&gt;&lt;a href="http://news.ycombinator.com/item?id=3339291"&gt;HN thread for the blog post above&lt;/a&gt; &lt;blockquote&gt;Making a pun on the post title: Every programmer is on a long, cyclical journey where every stepping stone feels like a new kind of enlightenment. Blogging allows them to share their brilliance with the world, showing how they are surely amongst the first to attain their new level of purity and zen. -- &lt;a href="http://news.ycombinator.com/user?id=peteforde"&gt;peteforde&lt;/a&gt; on HN&lt;/blockquote&gt;&lt;li&gt;&lt;a href="http://jawher.net/2011/01/06/on-templating-and-a-shameless-plug-of-moulder/"&gt;On templating, and a shameless plug of Moulder&lt;/a&gt;&lt;li&gt;&lt;a href="http://tobiasz123.wordpress.com/2008/11/19/pure-html-templates-theory/"&gt;Pure HTML templates theory&lt;/a&gt;, implemented as &lt;a href="http://code.google.com/p/querytemplates/"&gt;querytemplates&lt;/a&gt;&lt;li&gt;&lt;a href="http://scalate.fusesource.org/documentation/scuery.html"&gt;scuery&lt;/a&gt;&lt;li&gt;&lt;a href="http://search.cpan.org/~flora/HTML-Zoom-0.009006/lib/HTML/Zoom.pm"&gt;HTML::Zoom&lt;/a&gt;&lt;li&gt;&lt;a href="https://github.com/hij1nx/weld"&gt;weld.js&lt;/a&gt;&lt;li&gt;&lt;a href="http://cleancode.se/2011/01/04/getting-started-with-moustache-and-enlive.html"&gt;enlive&lt;/a&gt;&lt;li&gt;&lt;a href="https://github.com/westonc/CAST/"&gt;CAST&lt;/a&gt;&lt;li&gt;&lt;a href="http://wicket.apache.org/learn/examples/helloworld.html"&gt;wicket&lt;/a&gt; (it is solving non-persistant selectors issue with custom attributes)&lt;li&gt;&lt;a href="https://github.com/choonkeat/hquery"&gt;hquery&lt;/a&gt;&lt;li&gt;&lt;a href="https://github.com/jferris/effigy"&gt;effigy&lt;/a&gt;&lt;li&gt;&lt;a href="https://github.com/choonkeat/meld"&gt;meld&lt;/a&gt;&lt;/ul&gt;&lt;p&gt;More examples? It should use nice-to-write DSL with CSS/jQuery like selectors, and be able to "compile" templates to PHP inlining the dynamic code (like querytemplates is doing). There should be no special syntax in HTML, except &lt;a href="https://github.com/iaindooley/Fragmentify"&gt;template inhertiance&lt;/a&gt; (master page) if no better option exists.&lt;/p&gt;&lt;p&gt;I like the name "&lt;b&gt;template animation&lt;/b&gt;" (name by Iain Dooley) for doing this, even it is very bad for SEO. It sounds more fun than &lt;a href="http://xquerywebappdev.wordpress.com/non-obtrusive-html-replacing-non-ob/"&gt;non-obtrusive HTML replacing&lt;/a&gt; others are talking about. In fact it is not just replacement, it is generation, conditionals and else. "&lt;b&gt;&lt;a href="http://timelessrepo.com/mockup-driven-development"&gt;Mockup-driven development&lt;/a&gt;&lt;/b&gt;" (name by &lt;a href="http://news.ycombinator.com/user?id=judofyr"&gt;judofyr&lt;/a&gt; on HN) is not bad as well.&lt;/p&gt;&lt;p&gt;&lt;a href="http://fabien.potencier.org/article/42/parsing-xml-documents-with-css-selectors"&gt;Parsing XML documents with CSS selectors&lt;/a&gt; looks very useful.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.perlmonks.org/?node_id=674225"&gt;Push style templating systems&lt;/a&gt;&lt;/p&gt;. </description> <pubDate>Sat, 17 Dec 2011 01:05:27 +0100</pubDate><link>http://blog.goranrakic.com/2011/12/put_the_fun_back_in_writing_templates.html</link> <guid isPermaLink="true">http://blog.goranrakic.com/2011/12/put_the_fun_back_in_writing_templates.html</guid> </item> <item><title>Try the new flat icon set for LibreOffice</title> <description>&lt;b&gt;Update:&lt;/b&gt;&lt;br&gt; &lt;img alt="update2.png" src="http://blog.goranrakic.com/uploads/update2.png" width="679" height="75" style="margin: 0"/&gt; &lt;hr/&gt;&lt;p&gt; There is an ongoing effort to develop the new flat icon set for LibreOffice. Please see &lt;a href="https://wiki.documentfoundation.org/Design/Whiteboards/Flat_icon_set "&gt;this whiteboard wiki page&lt;/a&gt; for more info. The work is led by &lt;a href="https://github.com/libodesign/flat-icons/blob/master/AUTHORS"&gt;Issa Alkurtass&lt;/a&gt;. Icons are based on GNOME Symbolic theme and will probably be called Sifr in LibreOffice. &lt;/p&gt;&lt;p&gt; &lt;center&gt;&lt;a href="http://blog.goranrakic.com/uploads/libo_flat.png" target="_blank"&gt;&lt;img alt="libo_flat_thumb.png" src="http://blog.goranrakic.com/uploads/libo_flat_thumb.png" width="600" height="333" /&gt;&lt;/a&gt;&lt;/center&gt; &lt;/p&gt;&lt;p&gt; &lt;strong&gt;Building the icon set&lt;/strong&gt;&lt;br/&gt; The icons (stencils.svg) can be downloaded from the &lt;a href="https://github.com/libodesign/flat-icons"&gt;libodesign/flat-icons&lt;/a&gt; repository on GitHub. &lt;/p&gt;&lt;p&gt; In the SVG, each icon is the group or a clone with the ID property set to the icon name and the label is the same or set to just "icon". I used a Python script and Inkscape to export individual PNG files. To build the expected directory tree, the Python script will look for the same icon name in the Galaxy icon set and use the matching path when building the new set. &lt;/p&gt;&lt;p&gt; At first, we will need the Galaxy icon set. From the LibreOffice installation directory extract "share/config/images.zip" to the new "galaxy" directory. Next, download the most recent "stencils.svg" from the &lt;a href="https://github.com/libodesign/flat-icons"&gt;libodesign/flat-icons&lt;/a&gt; repository. &lt;/p&gt;&lt;p&gt; Now download &lt;a href="http://blog.goranrakic.com/uploads/cnvsvg.py"&gt;cnvsvg.py script&lt;/a&gt; and run it as: &lt;tt&gt;python cnvsvg.py stencils.svg flat galaxy&lt;/tt&gt;. As said, this will use Inkscape to extract individual icons to the "flat" directory, taking "galaxy" as the reference directory tree. &lt;/p&gt;&lt;p&gt; The flat icon set is not complete so to fill the missing icons we will use the Galaxy set again, but will also convert icons to grayscale for a better fit using ImageMagick: &lt;pre&gt;for i in `find galaxy -name "*.png"`; do convert $i -channel RGBA -matte -colorspace gray $i.png; mv $i.png $i; done&lt;/pre&gt; &lt;/p&gt;&lt;p&gt; Copy the flat icons over modified galaxy set (&lt;tt&gt;cp -r flat/* galaxy/&lt;/tt&gt;) and create the new icon set archive (&lt;tt&gt;pushd galaxy; zip -r ../images_flat.zip *; popd&lt;/tt&gt;). &lt;/p&gt;&lt;p&gt; Finally we will add this icon set to the installed LibreOffice. As we will not recompile the LibreOffice from the source code (see here for a &lt;a href="http://cgit.freedesktop.org/libreoffice/core/commit/?id=16613995dd9489e190e74eadae357a7b6c45c594"&gt;required patch&lt;/a&gt;), the only option to add a new icon set is to replace an existing one. I do not like the Crystal set, so I will just copy "images_flat.zip" over "share/config/images_crystal.zip" in the LibreOffice instalation path. Restart the LibreOffice and select the Crystal set in the preferences. &lt;/p&gt;&lt;p&gt; If you want to try the new flat icon set quickly, download &lt;a href="http://blog.goranrakic.com/uploads/images_flat.zip"&gt;images_flat.zip&lt;/a&gt; that is built from "stencils.svg" as of &lt;a href="https://github.com/libodesign/flat-icons/commit/a9fa769154ef7ce00a36f3bc03c0807c74c4a35c"&gt;2013-06-04&lt;/a&gt; (updated). &lt;/p&gt; </description> <pubDate>Mon, 27 May 2013 04:35:10 +0200</pubDate><link>http://blog.goranrakic.com/2013/05/try_the_new_flat_icon_set_for_libreoffice.html</link> <guid isPermaLink="true">http://blog.goranrakic.com/2013/05/try_the_new_flat_icon_set_for_libreoffice.html</guid> </item> <item><title>Understanding Docker volumes</title> <description>&lt;p&gt;Docker &lt;a href="https://docs.docker.com/userguide/dockervolumes/"&gt;data volumes&lt;/a&gt; are simply &lt;b&gt;directories on the host&lt;/b&gt;, mounted read-write or read-only at specific paths inside the container. We can also say container &lt;i&gt;“exposes” a path as the volume&lt;/i&gt; or that it &lt;i&gt;binds the path with the volume&lt;/i&gt;. Some say &lt;i&gt;container has a volume&lt;/i&gt; but that does sound a bit ambiguous.&lt;/p&gt;&lt;p&gt;Volumes allow container to persist data on the host, outside the union file system. Changes to files in the exposed volumes are therefore applied directly just as we would make them to the directory on the host.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;img alt="path3857.png" src="http://blog.goranrakic.com/uploads/path3857.png" width="300" height="97" align="center" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Command “&lt;tt&gt;&lt;a href="https://docs.docker.com/reference/commandline/cli/#inspect"&gt;docker inspect&lt;/a&gt; &amp;lt;container&amp;gt;&lt;/tt&gt;” shows all container paths mounted to volumes.&lt;/p&gt;&lt;p&gt;When creating a new container with “&lt;tt&gt;&lt;a href="https://docs.docker.com/reference/commandline/cli/#run"&gt;docker run&lt;/a&gt; -v …&lt;/tt&gt;” Docker mounts a volume at a given path. We can select host directory as the new volume or let the Docker make it automatically in &lt;tt&gt;/var/lib/docker/volumes&lt;/tt&gt;. If we let Docker create new volume, it will automatically remove it when all containers using it are removed.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;img alt="path3854.png" src="http://blog.goranrakic.com/uploads/path3854.png" width="420" height="174" align="center" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;New container can also reuse all volumes previously associated with some other container. Command “&lt;tt&gt;&lt;a href="https://docs.docker.com/reference/commandline/cli/#run"&gt;docker run&lt;/a&gt; –volumes-from &amp;lt;container&amp;gt; …&lt;/tt&gt;” would mount all volumes associated with a given container inside a new container. This is useful for sharing data between containers where we let the Docker automatically manage where volumes are stored.&lt;/p&gt;&lt;p&gt;All containers are created from images. An image can provide a list of paths that should be mounted to volumes. We can see this list with “&lt;tt&gt;&lt;a href="https://docs.docker.com/reference/commandline/cli/#inspect"&gt;docker inspect&lt;/a&gt; &amp;lt;image&amp;gt;&lt;/tt&gt;”. The output only shows paths, and these paths are not mounted to any volumes yet. When we do “&lt;tt&gt;&lt;a href="https://docs.docker.com/reference/commandline/cli/#run"&gt;docker run&lt;/a&gt; … &amp;lt;image&amp;gt;&lt;/tt&gt;” to create a new container from the image we must associate each path with a volume. If we do not give any options, Docker would automatically make required volumes in /var/lib/docker/volumes. When we remove the container, that volumes (if they are not shared with other containers) would be deleted. Each time we create new container Docker will make new volume(s) and mount them within the container.&lt;/p&gt;&lt;p&gt;What may look strange is that when automatically creating a volume for a new container, Docker would copy any existing data from the image. For example if we expose /var/log and create a new container without mount target, Docker would create a new volume in /var/lib/docker/volumes with a copy of /var/log from the image. If we mount volumes manually, using an empty host directory for example, nothing will be copied from the image and we will simply override mount target with a given (empty) directory.&lt;/p&gt;&lt;p&gt;This behavior makes it very easy to expose any path from the image as automatically managed volume to get data persistence. The new volume will be initialized with whatever data is present in the image. But it may be confusing if we manually mount the same path to a host directory that does not contain required data skeleton from the image and get a process crashing because of that.&lt;/p&gt;&lt;p&gt;When mounting volumes users (uid/gid) may not match and ownership and permissions might be messed up. This is why it is usually recommended to have a data-only container (without a running process) exposing volumes and a container using those volumes, both sharing same users. That saying you do not run everything as root :).&lt;/p&gt; </description> <pubDate>Sun, 29 Jun 2014 22:52:16 +0200</pubDate><link>http://blog.goranrakic.com/2014/06/understanding_docker_volumes.html</link> <guid isPermaLink="true">http://blog.goranrakic.com/2014/06/understanding_docker_volumes.html</guid> </item> <item><title>Custom EDID for intel i915 KMS on Fedora</title> <description>&lt;p&gt;Recently I started using my old DELL U2412M monitor on a system with integrated Intel graphics. As the motherboard exposes HDMI output only, and my monitor has DVI-D, I used some cheap passive DVI-D to HDMI adapter signal adapter. Unfortunately in this setup the card was not able to receive EDID info. Combine that with early KMS enabled on Fedora, all I could get is a blank screen with a timing error warning.&lt;/p&gt;&lt;p&gt;&lt;img src="/uploads/timingerror.png" /&gt;&lt;/p&gt;&lt;p&gt;It is possible to set custom EDID on Fedora following these steps:&lt;/p&gt;&lt;ol&gt; &lt;li&gt; &lt;p&gt;Get a valid EDID file&lt;/p&gt;&lt;p&gt;This is a file I found online (&lt;a href="/uploads/U2412M.bin" target="_blank"&gt;U2412M.bin&lt;/a&gt;), and quickly checked it with a &lt;code&gt;parse-edid&lt;/code&gt; tool. It is also possible to extract valid EDID from another system, where EDID is correctly recognized.&lt;/p&gt; &lt;/li&gt; &lt;li&gt; &lt;p&gt;Move the file to /usr/lib/firmware/edid&lt;/p&gt; &lt;/li&gt; &lt;li&gt; &lt;p&gt;Edit grub config file&lt;/p&gt;&lt;p&gt;Edit &lt;code&gt;/etc/defaults/grub&lt;/code&gt; and add this option to &lt;code&gt;GRUB_CMDLINE_LINUX&lt;/code&gt;:&lt;/p&gt;&lt;p&gt;&lt;code&gt;drm_kms_helper.edid_firmware=HDMI-A-1:edid/U2412M.bin&lt;/code&gt;&lt;/p&gt;&lt;p&gt;I also set &lt;code&gt;video=HDMI-A-1:D&lt;/code&gt; option to force output to be connected even if I disconnect the cable.&lt;/p&gt;&lt;p&gt;Regenerate the grub config file with &lt;code&gt;grub2-mkconfig &amp;gt; /boot/grub2/grub.cfg&lt;/code&gt;&lt;/p&gt; &lt;/li&gt; &lt;li&gt; &lt;p&gt;Rebuild initramfs&lt;/p&gt;&lt;p&gt;KMS is set early, from initramfs so we need to include our EDID file in the generated initrd.&lt;/p&gt;&lt;p&gt;I’ve added &lt;code&gt;install_items+=" /usr/lib/firmware/edid/U2412M.bin "&lt;/code&gt; to &lt;code&gt;/etc/dracut.conf.d/99-local.conf&lt;/code&gt; and used &lt;code&gt;dracut -f&lt;/code&gt; to rebuild the active initrd.&lt;/p&gt;&lt;p&gt;Check with &lt;code&gt;lsinitrd&lt;/code&gt; that the EDID file is included.&lt;/p&gt; &lt;/li&gt; &lt;li&gt; &lt;p&gt;Reboot&lt;/p&gt; &lt;/li&gt; &lt;/ol&gt;&lt;p&gt;Solved, and no need for these &lt;a href="http://www.ebay.com/itm/HDMI-dummy-plug-4K-DDC-EDID-emulator-fake-display-headless-digital-slim-/161265341755?hash=item258c29d53b:g:A8EAAOSw5ZBWOAFb"&gt;HDMI dummy plug - EDID emulator&lt;/a&gt;!&lt;/p&gt;&lt;p&gt;References:&lt;/p&gt;&lt;ul&gt; &lt;li&gt;&lt;a href="https://wiki.archlinux.org/index.php/kernel_mode_setting"&gt;Kernel Mode Setting&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="https://wiki.archlinux.org/index.php/intel_graphics"&gt;Intel graphics&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="https://www.kernel.org/pub/linux/utils/boot/dracut/dracut.html"&gt;Dracut&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; </description> <pubDate>Tue, 09 Aug 2016 19:25:00 +0200</pubDate><link>http://blog.goranrakic.com/2016/08/custom_edid_for_intel_i915_kms_on_fedora.html</link> <guid isPermaLink="true">http://blog.goranrakic.com/2016/08/custom_edid_for_intel_i915_kms_on_fedora.html</guid> </item> </channel> </rss>