Thursday 20 February 2014

ubuntu screen : mouse wheel scrolling work in a screen session


create a file(~/.screenrc) with below mentions code .. :)

~/.screenrc

# Enable mouse scrolling and scroll bar history scrolling
termcapinfo xterm* ti@:te@
you can find more discussion here http://unix.stackexchange.com/questions/18006/can-mouse-wheel-scrolling-work-in-a-usr-bin-screen-session

Friday 17 January 2014

ubuntu: gedit editor plugins


Install Gmate in Ubuntu. GMate is a collection of plugins, themes/styles and other improvements to get TextMate-like features in Gedit. Type the following commands to install Gmate.
sudo apt-add-repository ppa:ubuntu-on-rails/ppa
sudo apt-get update
sudo apt-get install gedit-gmate
When you are finished open your a .html.erb you will see syntax highlighted!  

Sunday 12 January 2014

Generate ssh key pair with using email

MySQL Create Database with UTF8 Character Set

 
CREATE DATABASE `database_name` CHARACTER SET utf8 COLLATE utf8_general_ci;
GRANT ALL ON `database_name`.* TO `username`@localhost IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
 
Alternate option by using 'CREATE SCHEMA'
 
CREATE SCHEMA `database_name` CHARACTER SET utf8 COLLATE utf8_general_ci;
GRANT ALL ON `database_name`.* TO `username`@localhost IDENTIFIED BY 'password';
FLUSH PRIVILEGES; 

Wednesday 18 September 2013

What does "Rack-based" mean in the context of ruby frameworks?


What does "Rack-based" mean in the context of ruby frameworks?


It means frameworks that implement the Rack interface, a common way for web servers and frameworks to communicate with each other. Using a Rack-based framework means that your web app can run on numerous servers (e.g., Mongrel, Litespeed, Passenger (Apache/Nginx), and whatever Heroku uses) without requiring special plug-ins.

Rack also provides "middleware," a lightweight layer between the web server and the framework. This lets you do things like proxies, logging, testing, and authentication in a fast and framework-independent way.

Sunday 4 August 2013

ubuntu : gedit plugin package for Ruby on Rails developers :

32 bit deb package and 64 bit deb package

It includes awesome plugins in gedit editor, you can enable them by doing click on check-box associated with plugin.

follow the steps to enable plugins in gedit :

File menu => Edit => Preferences => Plugins

reference : http://www.ubuntuupdates.org/package/ubuntu-on-rails/oneiric/main/base/gedit-gmate


Tuesday 30 July 2013

Rails default_scope is evil

http://rails-bestpractices.com/posts/806-default_scope-is-evil