CategoryDevelopment

Getting fast with rspec

get the gem from here

http://github.com/timcharper/spork

 

How to fix the Missing error

http://chrisblunt.com/blog/2009/08/28/rails-configuring-rspec-for-spork/

 

Fonts for coders

guda@guda-laptop:~$ sudo mkdir /usr/share/fonts/myfonts
guda@guda-laptop:~$ cd myfonts/
guda@guda-laptop:~/myfonts$ sudo cp *.ttf /usr/share/fonts/myfonts/
guda@guda-laptop:~/myfonts$ sudo fc-cache -f
guda@guda-laptop:~/myfonts$

Font sources:

 

Make X11 fonts available to Java

Perform one of the following:

  1. Open /etc/profile and add a new environment variableJAVA_FONTS=/usr/share/fonts/truetype
    export JAVA_FONTS
  2. Open font.properties file under jre/lib directory, uncommnent and set to the appropriate font directoryappendedfontpath=/usr/share/fonts/truetype

CSS round corner box – the easy way :)

http://www.neuroticweb.com/recursos/css-rounded-box/

Create object in different languages

Java, C++, Ruby, Python, etc…

Read more..

Continue reading

Wall of shame

Check this brilliant HTML I found in one of our projects

company_products

All of them are certainly not the same “Export Products”

Rails 2.3.2+, memcached and logger

Finally our twitterized version of psspy.se is ready. But! When in production – read with many connection – the memcached get overloaded by not closed connections and on 1024 it says

“accept(): Too many open file” and memcached dies.

After 1 day investigating the problem  we have found that the following line in the initializers is causing the problem

RAILS_DEFAULT_LOGGER.level = Logger::DEBUG

We havent investigating deeper but when commenting this line everything works fine.

We have tested with Rails 2.3.2 and 2.3.3 with memcache-client-1.7.4

Everyday git

Good resources

  • http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html
  • http://gitready.com/
  • http://book.git-scm.com/

Entity name recognition

Book – http://www.manning.com/ingersoll/

LingPipe

OpenCalais

http://opennlp.sourceforge.net/

Tika is a content extraction framework + Apache Solr Content Extraction Library (Solr Cell) + varios packages of solr

My Ubuntu workstation configuration

XOrg configuration

  • https://wiki.ubuntu.com/X/Config/Resolution
  • cvt 1680 1050 75
  • xrandr –newmode …the output from cvt
    xrandr –newmode “1680x1050_75.00” 187.00 1680 1800 1976 2272 1050 1053 1059 1099 -hsync +vsync
  • xrandr –addmode DVI-0 1680x1050_75.00

Lenovo Y510

You have to install the latest alsa.

Then replace the existing kernel modules with the just build one. Then run depmod -a as point kilbasar here

http://ubuntuforums.org/showthread.php?t=687663&page=2

sudo su
cd /lib/modules/2.6.22-14-generic/ubuntu/media/snd-hda-intel/
mv snd-hda-intel.ko snd-hda-intel.ko.bak
ln -s /lib/modules/2.6.22-14-generic/kernel/sound/pci/hda/snd-hda-intel.ko /lib/modules/2.6.22-14-generic/ubuntu/media/snd-hda-intel/snd-hda-intel.ko
cd /usr/src/alsa/alsa-driver-1.0.16rc2/modules
cp * /lib/modules/2.6.22-14-generic/kernel/sound/
depmod -a

Logitech Revolution MX

http://x4.6times7.org/dokuwiki/doku.php/devlog/blog/howto_logitech_mx_revolution_on_ubuntu

  • The mouse wheel control
    • Download from here http://goron.de/~froese/revoco/ or revoco-0.5.tar
    • make
    • sudo ./revoco manual=6
    • lets try to add it in ~/.xprofile next time
  • Here is my xorg.conf
Section "Monitor"
 Identifier "External DVI"
 # 1680x1050 74.89 Hz (CVT 1.76MA) hsync: 82.31 kHz; pclk: 187.00 MHz
 Modeline "1680x1050_75.00"  187.00  1680 1800 1976 2272  1050 1053 1059 1099 -hsync +vsync
 # 1680x1050 59.95 Hz (CVT 1.76MA) hsync: 65.29 kHz; pclk: 146.25 MHz
 Modeline "1680x1050_60.00"  146.25  1680 1784 1960 2240  1050 1053 1059 1089 -hsync +vsync
 # 1680x1050 69.88 Hz (CVT) hsync: 76.58 kHz; pclk: 174.00 MHz
 Modeline "1680x1050_70.00"  174.00  1680 1800 1976 2272  1050 1053 1059 1096 -hsync +vsync
 Option "PreferedMode"    "1280x1024_75.00"
EndSection

Section "Screen"
 Identifier    "Configured Screen Device"
 Device    "Configured Video Device"
 SubSection "Display"
 Depth    24
 Modes "1680x1050" "1024x768" "640x480"
 Virtual    2960 1050
 EndSubSection
EndSection

Section "Device"
 Identifier    "Configured Video Device"
 Option    "Monitor-DVI-0" "External DVI"
EndSection

My Development setup commands

I noticed simillar post here

sudo aptitude install mc vim subversion screen pidgin meld curl links2 vim-ruby vim-gnome vim-doc vim-scripts vim-ruby vim-perl \
subversion git-core bluefish kompozer\
libmysqlclient15off libmysqlclient15-dev mysql-common mysql-client \
libmysql-ruby1.8 irb ruby1.8 rdoc ri rake \
apt-utils build-essential ruby1.8-dev mysql-server memcached libxslt1-dev libpcre3-dev zlib1g-dev unzip gzip mytop openssl \
libopenssl-ruby libmagick9-dev imagemagick librmagick-ruby1.8 imagemagick librmagick-ruby-doc  libmagick9-dev ruby1.8-dev \
libdbd-sqlite3-ruby libsqlite3-ruby sqlite3 libsqlite3-dev

ln -s /usr/bin/ruby1.8 /usr/bin/ruby

mkdir ruby_install
cd ruby_install
wget http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz
tar xzvf ruby*
cd rubygems-1.3.5
ruby setup.rb
cd ..
cd ..

ln -s /usr/bin/gem1.8 /usr/bin/gem

gem install rails mysql mongrel mongrel_cluster rails paperclip will_paginate andand \
json feed-normalizer hpricot mechanize ruby-debug uuid ruport ruport-util acts_as_reportable \
rufus-scheduler annotate openwferu-scheduler production_log_analyzer capistrano-ext libxml-ruby twitter capistrano wirble RedCloth
rspec-rails sqlite3-ruby \
--no-ri --no-rdoc

gem install rmagick -v 1.15.12
ruby -rrubygems -e "require 'RMagick'; puts Magick::Long_version;"

cat > /home/guda/.irbrc
require 'rubygems'
require 'wirble'
Wirble.init
Wirble.colorize
require 'logger'
if ENV.include?('RAILS_ENV') && !Object.const_defined?('RAILS_DEFAULT_LOGGER')
Object.const_set('RAILS_DEFAULT_LOGGER', Logger.new(STDOUT))
end

Gmail notification
http://www.workswithu.com/2009/10/06/gmail-notifier-applets-for-ubuntu/

What about http://ubuntu-tweak.com/

Some nice software that I am looking arround

libhttp-access2 – lwp for ruby

ruby ide http://github.com/danlucraft/redcar/tree/master

© 2024 Gudasoft

Theme by Anders NorénUp ↑