Thursday, October 4, 2012

Wifi on Ubuntu Desktop

wireless networks: device not ready (firmware missing).
sudo apt-get update
sudo apt-get install firmware-b43-installer (OR firmware-b43-lpphy-installer) 

This will install the firmware needed to make Broadcom wireless card work.

Also make sure which wireless card is present.
 (Use lspci to find, in my case
Network controller: Broadcom Corporation BCM4312 802.11b/g LP-PHY)

Hide User Account on Windows logon

under this registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList

match the exact user account name,
and the value is one of the following (Decimal format)
0 – Hides the user just from the welcome screen
1 – The user is shown

Mic not working on Ubuntu 12.04

reinstall/install PulseAudio Volume Control (pavucontrol) (volume control tool (mixer) for the PulseAudio sound server)

sudo apt-get update
sudo apt-get install pavucontrol

Wednesday, July 4, 2012

Authenticating HTTP access to website


1) Edit .htaccess file as follows:

Order Deny,Allow
Satisfy All

# BASIC BLOCK - Note you may need AuthDigestFile instead of AuthUserFile
AuthType Basic
AuthName "Auth Name" #e.g.protected by apache
AuthUserFile physical path to .htpasswd file  #e.g. C:/xampp/htdocs/~/.htpasswd
Require user username

2) Use following command to generate .htpasswd file
htpasswd -c .htpasswd username

3) Place .htaccess file in the directory which needs authentication access

Tuesday, April 3, 2012

Useful for getting the Table View Cell height containing Text

-(CGFloat)labelHeightForText:(NSString *)text

{

   CGFloat constrainedSize = 231.0; //or any other size

   UIFont *font = [UIFont fontWithName:@"Helvetica" size:17.0];

   CGSize textSize = [text sizeWithFont:font 

                      constrainedToSize:CGSizeMake(constrainedSize, CGFLOAT_MAX)

                          lineBreakMode:UILineBreakModeWordWrap];

   return textSize.height;

}

Thursday, March 22, 2012

Script to delete .svn

find . -name ".svn" -type d -exec rm -rf {} \;