Kurinchi Blogger Scribbles …


Apr 04
2014

After VPS reboot, you may encounter this issue and the fix is simple. Follow these stops to prevent this error.

$ service mysqld stop

$ mv /var/lib/mysql/mysql.sock /var/lib/mysql/mysql.sock.bak

$ service mysqld start


Feb 21
2014

Yeoman is a tool for modern workflow to aid front-end web application development. Yeoman consists of three tools to manage this workflow and has generators available for Angular, Backbone and a collection of over 100+ other projects

+ Grunt – It is the builder and utility component that helps automate repitive tasks, script minification, javascript task compiler, compiling sass, coffee script
+ Yo – It is the code generator component that helps in scaffolding, writing boilerplate code, install some grunt tasks
+ Bower – It is the package manager for web and it helps fetch javascript library and/or javascript/css frameworks and its dependencies. This is similar to Maven for java.

Jan 09
2014

To find the collation of tables within MySQL database, you can use one of the commands listed below

mysql> show table status from exampledb;

mysql> SELECT TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, COLLATION_NAME FROM INFORMATION_SCHEMA.COLUMNS where TABLE_SCHEMA=’exampledb’;

 

To find the character set used in a MySQL table

mysql> SELECT tbl.table_name, CCSA.character_set_name FROM information_schema.`TABLES` tbl, information_schema.COLLATION_CHARACTER_SET_APPLICABILITY CCSA WHERE CCSA.collation_name = tbl.table_collation AND tbl.table_schema = “schemaname”;


Jan 08
2014

How to find the MySQL collation and character set?

Last updated: January 9th, 2014

To find the collation of a database

mysql> SELECT DEFAULT_COLLATION_NAME FROM information_schema.SCHEMATA WHERE SCHEMA_NAME = ‘exampledb’ LIMIT 1;

+————————+
| DEFAULT_COLLATION_NAME |
+————————+
| utf8_general_ci |
+————————+

 

To find the characterset of a MySQL database

mysql> SELECT default_character_set_name FROM information_schema.SCHEMATA S WHERE schema_name = “exampledb”;


Jan 02
2014

Sudo, Visudo -bash: visudo: command not found

Last updated: December 31st, 2013

Visudo is needed to make modifications to the sudoers file. In a fresh install of CentOS “sudoers” file is not normally found. To install visudo issue the command

$ yum -y install sudo

As a sys admin, you need to be careful when performing tasks with root privileges. To be cautious, you can create a new user and assign him with root privileges using “visudo”

$ /usr/sbin/visudo

# User privilege specification
root ALL=(ALL) ALL
test ALL=(ALL) ALL

In the above file, test is a new user created with root privileges. In order for the “test” user to have root privileges, command “sudo” should be used. It prevents the user from issuing any commands that can cause system wide havoc and it also logs the command inside “/var/log/secure” for review


Jan 01
2014

Changing host configuration
$ vi /var/lib/pgsql/8.4/data/pg_hba.conf

Add postgresql to startup process
$ chkconfig postgresql-8.4 on

Start postgresql service
$ service postgresql-8.4 start

Access postgresql
$ su – postgresql
$ psql

Create database
postgres-# create database test

List databases
postgres-# \list

Exit postgresql
postgres-# \q (or \quit)

Connect to database
postgres-# \c test (\connect test)


Dec 31
2013

How to install PostgreSQL on CentOS Linux?

Last updated: December 31st, 2013

First lets do an update before we start installing PostgreSQL

$ yum update

You can install PostgreSQL from CentOS Base repo or can do a search for the latest version and install it based on your needs. Method 1 describes manual setup and Method 2 indicates an install from CentOS base repo
Read more »


Dec 25
2013

Firefox: Responsive design testing for Mobile devices

Last updated: December 25th, 2013

Follow the below steps to set the preset value for responsive design testing on mobile devices

i) Go to the address bar in firefox and type “about.config

ii) You will get a warning message stating “This might void your warranty … Changing these advanced settings can be harmful to the stability …..”. Click the button “I’ll be careful, I promise!’

iii) In the search bar, type “presets” and look through the filter values for “devtools.responsiveUI.presets“. Double click on the preference name “devtools.responsiveUI.presets” and enter the values

[{"key":"320x480","name":"iPhone 3g/3gs","width":320,"height":480},{"key":"360x640","name":"Nokia E7, n90","width":360,"height":640},{"key":"640x960","name":"iPhone4/4s","width":640,"height":960},{"key":"640x1136","name":"iPhone5/5c/5s","width":640,"height":1136},{"key":"768x1024","name":"ipad1/2","width":768,"height":1024},{"key":"800x480","name":"Android-WVGA","width":800,"height":480},{"key":"800x1280","name":"KindleFireHD8.9","width":800,"height":1280},{"key":"2048x1536","name":"Retina display","width":2048,"height":1536},{"key":"600x800","name":"KindleFire/Galaxy/Nexus","width":600,"height":800}]

Once the values are entered, you can open a new instance of the browser and click ctrl + shift + m to open up the responsive web view


Dec 24
2013

Responsive web page testing tools available online

Last updated: December 25th, 2013

QuirktoolsScreenfly

Interesting site to test mobile web pages of various screen sizes (kindle fire, samsung galaxy tab, google nexus 7, apple ipad 1 – 3 mini, kindle fire HD,  motorola razr v3m, motorola razr v8, blackberry 8300, apple iphone 3 & 4, LG optimus S, Samsung galaxy S2, ASUS galaxy 7, apple iphone 5, samsung galaxy s3/s4)

Also this tool offers landscape and portrait modes in addition to scroll & retina effect.

StudiopressResponsive testing

Responsive test from responsivetest.net

Another interesting tool available online to check web page responsiveness on mobile phones, tablets, laptops and desktops. The web tool has resolutions for testing categorized by devices Apple, Blackberry (Bold 9930, Q10, Torch 9810, Torch 9850, Z10), Samsung, HTC, LG

Other tools

Browser resizing – http://resizemybrowser.com/

Responsive pixel – http://responsivepx.com/

Demonstrating responsive design – http://www.jamus.co.uk/demos/rwd-demonstrations/

Refer Wikipedia for the display of devices by pixel density http://en.wikipedia.org/wiki/List_of_displays_by_pixel_density


Jul 09
2013

Apache server is installed by default on Mac. Access the configuration settings for Apache by going to

$ cd /etc/apache2/
$ vi httpd.conf

To enable php, edit httpd.conf and uncomment the line
#LoadModule php5_module libexec/apache2/libphp5.so

Uncomment other lines that you may want to load in your system. As you are enabling PHP in your system, you may want to change the DirectoryIndex to
DirectoryIndex index.php index.html

Default group/user settings inside Apache on Mac is _www:_www

Read more »



Valid HTML 4.01 Strict  Valid HTML 4.01 Strict