Page 19 of 30

Merging search criteria with merge_conditions

  def search(params = {})
    cond = []
    cond << ["name LIKE ?", params[:name] + '%'] unless params[:name].blank?
    cond << ["email = ?",   params[:email]]       unless params[:email].blank?
    conditions = cond.map { |c| User.merge_conditions(c) }.join(' AND ')
    User.find(:all, :conditions => conditions)
  end

ruby classes and instances override

module InstanceMethods
def an_instance_method
“You called an_instance_method on #{self.class}”
end

end

module ClassMethods
def a_class_method
“You called a_class_method_from_module on #{self}”
end

def b_class_method
puts “b_class_metbod”
end

end

class MyClass
include InstanceMethods
extend ClassMethods

def MyClass.a_class_method
puts “Mine class Method”
end

def an_instance_method
puts “Mine instance”
end
end

my_class = MyClass.new
puts my_class.an_instance_method
puts MyClass.a_class_method
puts MyClass.b_class_method

System monitoring

Home EN

http://ganglia.info/?page_id=66

ntop

Guitar training

http://code.google.com/p/fofix/

http://www.fretsonfire.net/forums/viewtopic.php?f=3&t=32784

News monitoring

I want test the speed in which www.psspy.se (fixed)  will index my blog. checkout this article date and the coresponding search result in psspy.

I will put as a marked my favourite website http://www.cenite.com

Installing mysql 5.1 under gentoo

Errors

081218 12:48:05 [ERROR] Error message file ‘/usr/share/mysql/english/errmsg.sys’ had only 480 error messages,
but it should contain at least 617 error messages.

Can’t find messagefile ‘/usr/share/mysql/english/errmsg.sys’

if you get this message check what my.cnf you are using. maybe there is stated a

language = /usr/share/mysql/english

try removing this entry from my.cnf or simple copy the mysql/share directory from the source distribution.

Configuring Mysql Binary distro

scripts/mysql_install_db –user=mysql –basedir=/usr/local/mysql –log-bin=mysqld-bin –force –datadir=/var/lib/mysql

you can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd /usr/mysql-test ; perl mysql-test-run.pl

–log-bin=mysqld-bin

bin/mysqld_safe –user=mysql

Fix the libraries

pmcrawl02 lib # cat /etc/ld.so.conf
# ld.so.conf autogenerated by env-update; make all changes to
# contents of /etc/env.d directory
/usr/local/lib
/usr/i686-pc-linux-gnu/lib
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2
/usr/lib/libstdc++-v3/
/usr/local/mysql/lib

pmcrawl02 lib # ldconfig
pmcrawl02 lib # ldconfig -p | grep mysql

In gentoo you should create the following file:

# cat /etc/env.d/99mysql51
LDPATH=”/usr/local/mysql/lib”

Some Bad Ideas

Today we think with my colegue Vergil what will happend if we make/prepare an ISO file for the latest Windows Vista, install a keylogger, trojans and antivirus software (patched/setupped to ignore the installed keylogger). Then put some good programs, make some fancy changes and upload it as free downloading version world wide.

Brrrr. That sounds awfull. I am using such boosted/patched windowses. Maybe my life belongs to someone

Online games

http://www.alphabounce.com/

Make a visit to the virtual town of Sofia: http://sofia.myminicity.com/com

 

make a cooconut car. test your empoyees

http://ingenuitywelcome.com/game/

Well done !

Slavy Trifonov is blaming all Bulgarian politics and the live in Bulgaria:)

The interesting part is that in the video clip the bad guys are all the politic leaders and “showmens”

Linux Remote desktop

On the local machine

$ xhost +

$ xhost +some.host.com

On the remote machine

#!/bin/bash
DISPLAY=195.114.113.240:0
export DISPLAY

FreeNx Ubuntu

NXServer

© 2025 Gudasoft

Theme by Anders NorénUp ↑