Authorguda

Mount a key on a Lenovo keyboard

It was really tricky. To get the key out I have to pull it stright away with one screwdriver. But when I have to mount it back – it was nightmare!!!!

Those keyboards are getting really challenge. I can’t imagine how a kid will repair his keyboard in 2019 year.

So….The for me it was really easy if because I have found this post here.

  1. find a way to lock your screen
  2. mount the parts on the keyboard! not on the key
  3. Make sure that the little part of the deck-chair is mounted on first on the bottom parts of the laptop keyboard
    1. slide it from top to bottom to hold it firmly
  4. The big part of the deck-chair will lie on top of the laptop keyboard mount. Then with shrink it a little so that it falls in the holes bellow
  5. Next the put the key ontop of the already mounted deck-chair. but not exactly on top but a little bellow the middle point in a way that you can slip to down and above. This way the key will get mounted on the deck-chair (lower part). Next press it down to stick firmly the top part of the deck-chair.

Here is the picture of the Lenovo Y510.

check this http://www.machinaelectronics.com/store/keyboardkeys/Lenovo_IdeaPad_Y510

Publishing article with SEO rules

As I want to keep this post secret as possible I will not follow those rules here :)

  1. which keywords I need to have into the title of the article
  2. which additional keywords I need to have into the subtitle
  3. which text I want to promote to Heading or make it strong
  4. check the most important text in the article that has nice keyword density around my important information.
  5. if there are abbreviations – add the acronym tag to describe them.
  6. all images should have nice alt/title/file name text, When possible add link to the image to relevant information.
  7. links:
    1. which are my important links (containing keywords)
    2. which links should be interesting to be linked on psspy/dagens archive for more news
    3. does all links have title / alt tags, what keywords can I add there?
  8. do I want to provide a box with related news on this article

Auch – PHP

WTF?!

PHP use one standard but those Symfony guys use another?!

You may wonder why the helpers are named according to the underscore syntax rather than the camelCase convention, used everywhere else in symfony. This is because helpers are functions, and all the core PHP functions use the underscore syntax convention.
ref: http://www.symfony-project.org/book/1_0/07-Inside-the-View-Layer#chapter_07_sub_helpers

Argh…this rmagick gem – aways difficult to install/maintain.

I have recently upgraded to Ubuntu 10.04 and I got this nasty rmagick gem error:

RMagick2.so: This installation of RMagick was configured with ImageMagick 6.5.5 but ImageMagick 6.5.7-8 is in use. (RuntimeError)

google for This installation of RMagick was configured with ImageMagick 6.5.5 but ImageMagick 6.5.7-8 is in use. (RuntimeError)

then found this page in mixed English/Chinees

and finally got a page in German :)

Then I decide to write this post in English and slightly modify the solution

instead of putting

RMAGICK_BYPASS_VERSION_TEST = true in the deploy.rb

I have put this in the development.rb

and all it works – this way on the production I will be forced to use real compatible library or at least check again for another solution or gem.

AUCH! This solution doesn’t work even in development I got weird core dumps :( …so here it is another try

Here is the real working  solution:

su -
git clone http://github.com/rmagick/rmagick.git
cd rmagick/
ruby setup.rb
ruby setup.rb  install

How to turn your free client to a payed one

Very good examples of phrases like

  • ‘If you’d like me to do that for you, I charge $XXX/hour.’
  • ‘I can spend ten minutes with you, and if you require more assistance I will be glad to schedule a consultation at my regular rates.’
  • ‘You do know that we just crossed into paid time?’ he asked. ‘Oh, yes,’ the prospect said

read the full article here >

http://freelanceswitch.com/freelancing-essentials/turn-free-advice-into-clients/

Nice code

I have just finished one method and I was not happy with the code. Then I put a comment on top of the method “Far from perfect….”.

Then I read the class – it was ugly.

here is the before

def validate
 return if is_email == false
 found = InternetComunicatorType.find(:first, :conditions => {
 :is_email => true,
 })

 return unless found

 if found.id != id
 errors.add(:is_email, "We have already email type")
 return
 end
end

here is the after

def validate
  if is_email
    found = InternetComunicatorType.find(:first, :conditions => {
      :is_email => true,
    })

    if found and found.id != id
      errors.add(:is_email, "We have already email type")
    end
  end
end

The result is much far readable

Mongoid presentations

When starting with mongoid I have missed a lot some demo source code.

How it works with controllers, does it plays nice with nested attributes, such things.

Here is presentation of mongo  and here are some slides

Mongoid

I writing this post for those who start using Mongo in their rails applications. I want to share my experience. First I discovered mongoid but then i saw mongo_mapper  – so I decide to go with the crowd. But! I was wrong. I there is no documentation for mongo_mapper but some blog posts arround, the examples are not aways working and you have to fight with all the code – I don’t maybe I have found some old documentation. When you dive in the code – again no documentation and not clear behaviour. Maybe it is a good solution but for me it doesn’t work. I lost 1.5 days experimenting and hoping that the things will go.

Then I give a try with mongoid. It has wonderfull documentation for starters also it seems at first glance that the code in mongoid is more readably and human friendly. It took me 2hours to port all my models to mongoid.

The guy developing mongoid seems pretty active.

last words – it is pleasure to work with mongoid – I recommend it to all.

A lot of Javascript this days

I am migrating to jQuery and found this wonderfull tutorial on their webpage.
A must read for anyone which pretend to know js.

http://docs.jquery.com/Types

Малко хумор за твоя сметка

© 2026 Ivo Bardarov

Theme by Anders NorénUp ↑