October 9, 2009
paps on Git
August 12, 2009
How to recover the headset issue with the manner mode
ヘッドセットが手元にある場合は、再度抜き差しで元に戻すことができますが、手元にない場合回復する手段はレジストリをいじる以外にありません。以下のキーを1から0にすることで元に戻せます。
HKLM\Software\HTC\MannerMode\HeadsetA
July 14, 2009
How to add a feature to spotlight a column search on ActiveScaffold
So this is just a tips to add a column-based search feature to the ActiveScaffold. you can just patch it out to lib/active_scaffold/actions/search.rb and/or live_search.rb, or add it to your controller where you want to enable this feature.
def do_search
@query = params[:search].to_s.strip rescue ''
unless @query.empty?
tmpq = @query.split(' ')
columns_query = {}
tmpq.delete_if do |x|
retval = false
if x =~ /\A(.*):(.*)\Z/ then
p = $1
v = $2
if !p.nil? && !p.empty? && !v.nil? && !v.empty? &&
active_scaffold_config.columns.include?(p) then
columns_query[p] = v
retval = true
end
end
retval
end
columns = active_scaffold_config.live_search.columns
like_pattern = active_scaffold_config.live_search.full_text_search? ? '%?%' : '?%'
search_conditions = self.class.create_conditions_for_columns(tmpq, columns, like_pattern)
self.active_scaffold_conditions = merge_conditions(self.active_scaffold_conditions, search_conditions)
columns_query.each do |p,v|
active_scaffold_config.columns.each do |column|
next if column.column.nil?
if column.column.name == p then
sql = column.column.text? ? "LOWER(#{column.search_sql}) LIKE ?" : "#{column.search_sql} = ?"
token = column.column.text? ? like_pattern.sub('?', v.downcase) : column.column.type_cast(v)
self.active_scaffold_conditions = merge_conditions(self.active_scaffold_conditions, [sql, token])
break
end
end
end
@filtered = !search_conditions.blank?
includes_for_search_columns = columns.collect{ |column| column.includes}.flatten.uniq.compact
self.active_scaffold_joins.concat includes_for_search_columns
active_scaffold_config.list.user.page = nil
end
end
July 10, 2009
How to get rid of the line separators on Today
REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Microsoft\Today]
"HidePluginSeparators"=dword:1
June 30, 2009
How to enable fingerprint reader on Fedora 11

Although you could do use the fingerprint reader with thinkfinger package if it supports your device, this is a new feature available since Fedora 11, which is well integrated to the desktop and more convenient.
It's available without taking any actions if you install Fedora 11 freshly. otherwise you just need to install some packages like:
- fprintd
- fprintd-pam
- gdm-plugin-fingerprint


To register your fingerprint, run gnome-about-me or "About Me" from System->Settings at the panel. and click a "Enable Fingerprint Login..." button. follow the wizard to complete the fingerprint registration. you need to place your finger on the reader 3 times to ensure if it reads correctly.
Once the registration is successfully finished, authentications for, such as login, sudo, screensaver and so on will be done through your fingerprint reader device then. pretty easy :)
Enjoy!