As I’ve always strived to automate my home, as much as I can. Although I can’t still turn the lights on and off, I’m capable of controlling my TV, my set-top-box and my multimedia PC with my iPhone. And the problem with the lights is not so much of “impossible” but rather I don’t feel like tearing down my laws to run cables. I actually managed to write an app for a friend to turn his garden lights on and off with his iPhone.

For that purpose, having my TV remote is essential! Unfortunately, after I upgraded my iPhone 3Gs to 4s, the Samsung Remote app started crashing on each launch. Here’s how I managed to get it working:

  1. Turn off Wi-Fi and cellular data
  2. Start Samsung TV
  3. Go into Demo Play
  4. Turn back on your Wi-Fi
  5. Hit refresh
  6. Select a TV from the list
This seemed to work for me, even after I restarted the App.

 

Since WordPress updated their iOS app to include location for posts, it came to my attention that it is fairly easy to add location to your posts – and it works nicely with the “Quick Photo” feature of the iOS WordPress app.

Unfortunately after I installed the WordPress GeoLocation plugin OnSwipe’s iPad theme stopped working for me. After some digging it turned out it is because Geolocation is overwriting the default alias of $ of jQuery which was breaking OnSwipe.

Here is how to fix that:

  1. Go to your admin panel
  2. Go to Plugins -> Editor
  3. In the drop-down Select plugin to edit choose “Geolocation”
  4. From the file list Plugin Files (just underneath the drop-down) select geolocation/geolocation.php
  5. Find in the code the function add_google_maps (use your browser’s search function and look for “function add_google_maps”)
  6. Find the line that reads: var $j = jQuery.noConflict(); either comment it out by prepending two slashes in front of it or delete it
  7. In its place add the following: $j = jQuery;
  8. Click Update File

This should fix OnSwipe and at the same time allow your visitor to view the location tag of your posts!

Posted from Ruse, Ruse, Bulgaria.

Ubuntu 11.10 is out! So the package manager prompted me to upgrade from Ubuntu 11.04 and so I did. The upgrade process took several hours, but mainly because I wasn’t paying attention and I didn’t take immediate action of different prompts regarding the upgrade process.

I decided to keep all of my config file modifications hoping that would give me less headache at the end. Nevertheless, I got several problems after I booted in my new shiny Oneric Ocelot (Ubuntu 11.10′s codename).

  1. I couldn’t go past the login screen – the solution was simple – for some reason my ~/.Xauthority file was owned by root:root – I simply deleted the file and that fixed it
  2. I didn’t get any sound in Unity, but only in Unity as it turns out, as aplay was playing sound just fine. The sound preferences’ Hardware tab was also completely empty. I deleted the ~/.pulse folder and re-logged and I could re-configure my sound. Sound was back on!
I’ll keep this post updated if I come across more problems, and hopefully their solutions.

Rest in piece, the world surely misses you!

Posted from Sofia, Sofia-grad, Bulgaria.

When I upgraded to Lion suddenly my colorful SSH prompts on remote linux machines became dull and black and white. It took me some time to figure out what was going out, so at first I edited my Ubuntu .bashrc file and uncommented force_color_prompt=yes. But this didn’t seem right. So after some digging I found the problem – in Snow Leopard Terminal.app by default was identifying itself as xterm-color, but now in Lion it is xterm-256color, which the remote Ubuntu did not recognize. So to fix it without changing anything on the remote machines, do the following:

  1. Open Terminal.app Preferences
  2. Go to the Settings tab
  3. In your default theme go to the Advanced tab
  4. On the first line Declare terminal as: select xterm-color, instead of the default xterm-256color
  5. Reopen Terminal.app and voilà – the colored SSH command prompt is back!

Честит празник (на патерица) на всички, които могат да прочетат това.

От няколко години насам, по случай 24 май, много се чепка темата за кирилицата, шльокавицата и произвдните им азбуки, които средностатистическия българин употребява.

“Младите”, които използват компютри са упреквани, че си развалят езика и нямат правопис. Често се набедяват популярните програми – фейсбук, скайп (я вижте как хубаво изглеждат тия търговски марки написани на кирилица) и т.н.. Но дали те са причината?

Определено не!

И двата софтуера имат “меню на български”. А именно “менюто на български” е причината да пишем на латиница. Разгледайте обявите за телефони от преди няколко години – като част от “екстрите” на телефоните неотменно присъства “меню на български”. В 2011 почти всички телефони имат въпросното меню и способ да се пише на кирилица, но до преди няколко години това определено не беше така.
Същото се отнася и за компютрите – голяма част от софтуерните програми нямат “меню на български”, а до преди излизането на Уиндоус Виста, дори и сносна кирилица нямаше! Тази по БДС не се брои! Защо? Ами защото за някой, който тепърва започва да работи с компютър не може да намери БДС еквивалента на клавиатурата, защо такъв няма, защото държавата е допуснала да се продава в рамките на държавата продукт, който не отговаря на националните изисквания, а именно – не поддържа националния стандарт за клавиатурна подредба с обозначение на клавишите на кирилица. От тук всеки започва да ползва подредбата ЯВЕРТЪ – тук поне буквите ги има, а тази подредба я има поне от края на 80-те години! Т.е. проблема с БДС подредбата на клавиатурата не е от вчера. И така хем няма клавиатура с БДС, хем няма фонетична подредба в най-масовата операционна система! От там, започва да се ползва и латинската азбука за писане на български.

От скоро имаме и фонетична подредба, заложена системно в по-новите версии на уиндоус, но това не означава, че навика отмира трудно – даже напротив. В един момент започва да става дразнещо да превключваш от кирилица на латиница и обратно. А това се налага често, понеже всички интернет адреси са на латиница!

Заключенията, кой е виновен за слабата грамотност оставям на вас.

Извинете ме за правописните грешки, но за мен езика е средство, а не самоцел.

It took me two days to figure out how to initialize a new child record from within the parent model, I hope this helps someone:

I’m using devise for authentication and authorization and using devise built-in controllers. My User model has a child Contact model (Contact belongs_to :User) which contains the user’s names and contact information. I preferred not to initialize the content model on new registration in the view (what’s the point of MVC philosophy if you don’t follow it?).

The solution (in Ruby on Rails 2.3.11) is the after_initialize callback


class User < ActiveRecord::Base
  has_one :contact, :dependent => :destroy
  accepts_nested_attributes_for :contact, :allow_destroy => true

  # Devise modules will go here

  attr_accessible :contact_attributes

  def after_initialize
    self.build_contact if self.contact.nil?
  end
end

and voilà! Your Contact model will be initialized and thus shown in the view when you use f.fields_for :contact

Merry Christmas from Puffy – the destroyer of worlds!

Merry Puffmas

Публикувам следните редове, които са коментар по статия от онлайн изданието на вестник Капитал с една единствена цел – тази информация е повече от важна, за да се противодейства на монополната практика на Мобилтел, и би било жалко, ако тя се загуби поради една или друга причина от http://www.capital.bg . Копирането и тук е с цел тя да е достъпна и за други, които като мен са попадали в тинята от лъжи на служителите на М-тел.

Read the rest of this entry »

Драги ми несебърци, защо си мислите, че Несебър е автономна държава и не е част от България?!

Вашият град принадлежи към културното наследство на БЪЛГАРИЯ и ЕВРОПА! Ако не Ви харесва да живеете в град-музей – преселете се! Ако пък си мислите, че с една подписка можете да решавате от името на цяла България дали културното ни наследво да бъде запазено или не, то тогава заслужавате да се стартира подписка за изселването Ви от Несебър, защото Вие явно не можете да оцените къде живеете и какво искате да разрушите за някой допълнителен лев от недекларирани квартирни наеми!