27 June, 2011

Extra padding on < button >

I just had a problem with firefox. When I tried to run have a code like this

<button><span>My Button</span></button>

Firefox added 3px of left margin to the buttons. after a little bit of a search found that this snippet of code can solve the issue

button::-moz-focus-inner {border: 0;padding: 1px 0px 0px 0px;}

Found this here, http://www.aheadcreative.com/removing-unwanted-button-padding-in-firefox/


23 June, 2011

It has been 5 months

Oh nooooo!
I missed my blog for the last 5 months. I havent posted anything after january, so anyway I am back following up some nice ideas to write up.

25 January, 2011

Enable @font-face on Google Chrome

Its just so easy to enable @font-face or remote font support in chrome. This is what I did one Mac.

open up a terminal and run this, and it enables the font-face support for chrome browser.

/Applications/Google Chrome.app/Contents/MacOS/Google\ Chrome --enable-remote-fonts

fonts wont be crappy after this ;)

18 January, 2011

if iPhone 4 doesnt switch on

I had this problem today, and was pissed off as my iPhone is so new to break. Anyway after going thru the net I found some solution and it worked for me.

What I did was to press the power / sleep button and the home button simultaneously for 10 seconds and the apple logo appeared which means the phon started.

thought to share this and it will be helpful for you.

17 January, 2011

Vertical text

I would keep this blog post short enough which explains a way to display text vertical on any browser.
So the problem which I tried to address is that I had to display some text vertically for some website project I did.
With HTML 5, CSS 3 this is no problem at all, but it has to look the same in IE as well.

Alright this is my HTML.

<span class="time"><span>January 17, 2011</span></span>

So for CSS3 supported browsers, (which are running on Gecko and Webkit) I used this.

-webkit-transform: rotate(-90deg);
-moz-transform: rotate(-90deg);

For IE I had to use a separate CSS which is intentionally works to render text vertically, I could use the features
of filters. The BasicImage filter which is capable of rotating any DOM element which has a layout solved the issue.
This was my CSS for IE.

<!--[if IE ]>
<style type="text/css">
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
</style>
<![endif]-->

the rotation param works like 1,2,3 with respective to 90, 180, 270 degrees.

This solved my problem.

07 November, 2010

Removing MYSQL completely from OSX

Today I was running through hell to find out how to remove mysql completely from OSX. Why I wanted to do this is to I installed a wrong version of MySQL on my mac, and wanted to downgrade it, and when I try to install the older version it never allows me to install and says there is a newer version installed on my disk, and therefore cant let me install the one I am trying to do.

alright here is the trick

follow these steps and it should remove mysql from your machine.

1. Make sure you have killed mysql
2. Delete the mysql folder in the local folder ( sudo rm -Rf /usr/local/mysql and sudo rm -Rf /usr/local/mysql* )
3. Remove mysql references from the StartupItems ( sudo rm -Rf /Library/StartupItems/MySQLCOM )
4. Remove it from the PreferencesPanes ( sudo rm -Rf /Library/PreferencePanes/My* )
5. Edit the host config ( vi /etc/hostconfig ) file with VI editor or any text editor you prefer and remove the line MYSQLCOM=-YES-
6. Most importantly you have to delete every mysql related file from the receipts folder ( cd /var/db/receipts/ AND cd /Library/Receipts/ )

These steps have to solve the issue. It worked for me anyway.


20 September, 2010

Easy steps to set up SVN

At SilverStripers I have been working on setting up SVNs for 100 times, every two weeks I am setting up a new SVN repo, sometimes I have to install SVNAdmin and start from the scratch. Then there comes Capistrano for deployments, etc. etc.

Though that it will be good to maintain a blog post on how to set up SVN as then I can refer to it anytime I need, and thought it will be useful for others if I blog it here. Following are the steps I use.

Installing a SVN admin

this is a good source (http://subversion.apache.org/packages.html)

I mainly use Fedora and Debian

If it is Fedora
$ yum install subversion

If it is Debian

$ apt-get install subversion

Alright I've got the SVNAdmin now.

1. Creating a repository

svnadmin create /repo

2. Create users

vi /repo/conf/svnserve.conf

configure the svn ( these are some basics )

anon-access = none
auth-access = write
password-db = passwd

add the password file

vi /repo/conf/passwd

In that file add the users

username = password

3. Start SVN

svnserve -d