Monday, July 11, 2016

Drupal 7 Views field customization

Lets say you have a drupal 7 installation with Views enabled. Now you have a view for a products page or a block. Lets say you are not happy with the the fonts, the position or any front end related to the field. How do you overcome this situation. One way is to theme the particular field.

1) In the view, for the field go to the style settings,
a. select customize field HTML
b. select the HTML element like say 'DIV' in this case. Lookup for each and what they mean.
c. select create a CSS class and give it a name say, 'product_title'
d. Finally hit apply. We are done with the ui side of the setup.

2) Now, lets try to customize the field class we defined above for class name 'product_title'
a. You can either pass the full CSS path like below to be specific or the actual element itself making it like more global like.
b. Open you CSS which could be your_theme/css/style.css and add like below.
div.product_title,
.product_title {
align_text: center,
font-size: 1.145em
}


Thursday, April 28, 2016

Orange Pi Plus 2 LAN setup


Update the below file
`sudo nano /etc/network/interfaces`

to look like below
`auto eth0 
iface eth0 inet dhcp`

Then finally do like below
`sudo /etc/init.d/networking restart`

To manually update your ip, do like below
`ifconfig eth0 192.168.1.5 netmask 255.255.255.0 up`

 I connected my pi to a Mac book pro via LAN. The Mac book was set to share its internet connection. Make sure the thunderbird is green on the Network setings.

Then you can do like below to install xfce desktop

`sudo install_xfce_desktop`

Tuesday, December 29, 2015

BC Accident free Driving Tips

Below are the most important life saving tips when driving especially for Vancouver BC.


  • Intersections are the most dangerous spots for accidents to occur
  • To make right turn. Always stop before the intersection when you don't not have the right of the way, say red signal. If not confident of the on coming traffic please don't move at all and wait for the green signal and proceed when it is clear.
  • To make left turn. Wait with your car's back on the white line until there is no vehicle coming from the opposite direction. Watch for the road median on left when you are waiting. Enter the lane next to the median as soon as you confidently know that there is no vehicle coming from the opposite direction or you have large safe gap from the vehicle from front (say 70 - 100 meters) to turn left easily.
  • Having your car's nose near or in front of the curb is dangerous when you are waiting to make the right turn.
  • Practice, practice and practice on easy routes first and slowly try tougher maneuvers like left turns on bigger roads.


    DISCLAIMER: PLEASE NOTE THAT ALL THE INFORMATION PROVIDED HERE IS FOR LEARNING PURPOSE ONLY WITH TIPS AND IDEAS BUT SHOULD ANYWAY CONSULT WITH THE LOCAL LAWS TO CONFIRM THE SAME.

Monday, November 12, 2007

Fine Tune Linux for Desktop

Setting hda DMA on and making it 32bit
hdparm -t /dev/sda (Check perfomance after passing below arguments)
hdparm -c 1 /dev/sda
hdparm -d 1 /dev/sda

Nice Performing Borders
gconftool-2 --type string --set /apps/metacity/general/theme Atlanta
Disable Gnome Splash
gconftool-2 --type bool --set /apps/gnome-session/options/show_splash_screen false

Manipulate SWAP
sudo cat /proc/sys/vm/swappiness
sudo sysctl -w vm.swappiness=100
Add 'vm.swappiness=100' or more in vim /etc/sysctl.conf depend upon available SWAP
Add 'vm.swappiness=10' in vim /etc/sysctl.conf if high RAM

Source
Part I http://www.linuxjournal.com/article/8308
Part II http://www.linuxjournal.com/article/8317
Part III http://www.linuxjournal.com/article/8322

Browser background color or monitor brightness

Have you been in a situation where you are almost sitting the whole day in front of your browser and going through a document and find that ...