1. Taken with Instagram at Presernov trg

    Taken with Instagram at Presernov trg

  2. Taken with Instagram at Ljubljana

    Taken with Instagram at Ljubljana

  3. Find and replace in files, Terminal-style

    This snippet is short and helpful, though not a simple one and in cases even a dangerous one. It will help you replace text in multiple files on a Mac or Linux through a terminal.

    Warning: make sure you know what you’re doing! I take NO responsibility for any damage caused by running the commands explained below! 

    find A_FOLDER -name '*.SOME_FILE_EXTENSION'|sed 's/ /\\ /g'|xargs perl -pi -e 's/FIND_THIS_TEXT/REPLACE_WITH_THIS_TEXT/g'

    The placeholders I’ve put in the command are self-explanatory, but I’ll describe them anyway.

    •  A_FOLDER
      The folder where the search will start. It can be the current one (.), just try to make sure that you DO NOT RUN this in the root (/).
    • SOME_FILE_EXTENSION
      Search only for this specified extension. To search through all filetypes, you can just omit the whole “-name” argument.
    • FIND_THIS_TEXT
      The text your searching for.
    • REPLACE_WITH_THIS_TEXT
      The replacement text.

    The breakdown of the command, just to make it easier for you to understand what we just did there:

    1. find A_FOLDER -name ‘*.SOME_FILE_EXTENSION
      Tries to find all specified files within the specified location (and its children).
    2. sed ‘s/ /\ /g’
      The previous command does not escape the spaces in the paths, so we correct that here.
    3. xargs perl -pi -e ‘s/FIND_THIS_TEXT/REPLACE_WITH_THIS_TEXT/g’
      Then the correct output is sent to the perl interpreter to do its magic and make the replacement itself.

    For example, I’d replace my old company name in the header text of all source files (.m) belonging to a project named “foobar” by running the following:

    find /Users/bojand/Projects/foobar -name '*.m'|sed 's/ /\\ /g'|xargs perl -pi -e 's/MyOldCompany/MyNewCompany/g'

  4. A Cold January Night (Taken with Instagram at Ljubljana)

    A Cold January Night (Taken with Instagram at Ljubljana)

  5. One rainy afternoon (Taken with instagram at Ljubljana)

    One rainy afternoon (Taken with instagram at Ljubljana)

  6. Gorgeous Ljubljana (Taken with instagram)

    Gorgeous Ljubljana (Taken with instagram)

  7. RT @thurrott: Shhh…. It’s true: Microsoft is working on iPad apps.

  8. jonathanmoore:

    Making Future Magic: iPad Light Painting

    Agency Dentsu London and BERG London team up to experiment with painting 3-dimentional typography using an iPad and long exposures.  

    Go ahead, take 5:35 minutes to watch this and get inspired to create something incredible.

  9. Rails 3.0 installation issues with Ruby 1.8.7 on Snow Leopard

    When trying to install Rails 3.0 on a fresh Ruby 1.8.7 setup on your Mac, you may get this error:

    Exception `Errno::ENOENT' at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rdoc/options.rb:576 - No such file or directory - lib
    File not found: lib

    I’ve resolved the issue by installing rdoc and followed the instructions given by the install process:

    $ sudo gem install rdoc
    $ sudo gem install rdoc-data
    $ sudo rdoc-data --install
    $ sudo gem rdoc --all --overwrite

  10. Subversion using SSH tunneling on Windows

    When trying to access a Subversionrepository with SSH using the Subversion command-line tool on Windows (svn.exe), the following error occurs:

    svn: Can't create tunnel: The system cannot find the file specified.

    The solution is quite simple, indeed. The only additional software needed is PuTTY (http://bit.ly/PjvGj).

    Make sure your key is loaded with Pageant.

    Set the SVN+SSH environment variable:

    • Tip: You can access the System panel by pressing Windows Key + Break
    1. Windows XP: Control Panel > System > Advanced > Environment Variables > System Variables > New…
      or
      Windows Vista/7: Control Panel > System > Advanced System Settings > Environment Variables > System Variables > New…
    2. Variable name: SVN_SSH
    3. Variable value: C:\Program Files\PuTTY\plink.exe (If the path to PuTTY is different from the one above, change it accordingly, but make sure that all backslashes are doubled)

    Open a new (!) command-line and try listing one of your repositories. It would look something like this:

    svn list svn+ssh://user1@example.org/svn/foo/bar

    Another approach is to use TortoiseSVN’s plink, which works well with the Subclipse plug-in for Eclipse.