These are my personal notes that I am making on my journey through computer science. It's just a great way for me to organize my thoughts and just maybe, I'll help someone else along the way. If this was any help, leave a comment.
Wednesday, February 29, 2012
Friday, December 9, 2011
Thursday, November 3, 2011
Introducing iPhone-style Checkboxes
Saturday, September 17, 2011
Sass
http://sass-lang.com/
Thursday, August 25, 2011
Saturday, June 11, 2011
jQuery Image RollOver
$(function() {
$('img[data-hover]').hover(function() {
$(this).attr('tmp', $(this).attr('src')).attr('src', $(this).attr('data-hover')).attr('data-hover', $(this).attr('tmp')).removeAttr('tmp');
}).each(function() {
$('
});;
});
Here is the var you add to the img

Here is the original link
http://www.selfcontained.us/2008/03/08/simple-jquery-image-rollover-script/
jQuery Image RollOver
$(function() {
$('img[data-hover]').hover(function() {
$(this).attr('tmp', $(this).attr('src')).attr('src', $(this).attr('data-hover')).attr('data-hover', $(this).attr('tmp')).removeAttr('tmp');
}).each(function() {
$('
});;
});

jQuery Image RollOver
$(function() {
$('img[data-hover]').hover(function() {
$(this).attr('tmp', $(this).attr('src')).attr('src', $(this).attr('data-hover')).attr('data-hover', $(this).attr('tmp')).removeAttr('tmp');
}).each(function() {
$('
').attr('src', $(this).attr('data-hover'));
});;
});

Tuesday, April 26, 2011
How to grep in unix
Wednesday, February 16, 2011
Thursday, January 13, 2011
Making DIV a Link - Javascript Vs CSS
Few days ago, I was looking for the best way to make a DIV into a link when I came across this website: Almost Effortless!. The author showed how to make a div a link with a little bit of Javascript (see article). It is actually pretty simple:
The Javascript Technic:
view plaincopy to clipboardprint?
1.
By this method, the whole block is clickable with just a single line of code while, with CSS, you will need to set few parameters to get the same result. Pretty cool, no?
Here is the CSS technic:
Now, let’s see how it works with CSS.
First, put a link inside your div:
view plaincopy to clipboardprint?
1.
…and now set the link’s display property to 100% to fill the DIV in your stylesheet:
view plaincopy to clipboardprint?
1. #header {
2. width:300px;
3. height:100px;
4. border: solid #EEE;
5. }
6.
7. #header a {
8. display:block;
9. width:100%;
10. height:100%;
11. text-decoration:none;
12. }
13.
14. #header a:hover {
15. text-decoration:none;
16. background-color: #EFEFEF;
17. }
#header {
width:300px;
height:100px;
border: solid #EEE;
}
#header a {
display:block;
width:100%;
height:100%;
text-decoration:none;
}
#header a:hover {
text-decoration:none;
background-color: #EFEFEF;
}
Conclusion:
As you can see, the Javascript technic is faster than the CSS one but keep in mind that some people might disable Javascript in their browser and won’t see the link.
Tuesday, November 16, 2010
Tuesday, August 3, 2010
Flare Video
Friday, June 18, 2010
jQuery Pirobox
Saturday, June 12, 2010
Fixed Background Image
background:#42021E url(images/bg.png) repeat-x;
background-attachment:fixed;
}
If you want to learn more about backgrounds, you can read up at w3chools.
Wednesday, June 9, 2010
How to get www in front of your URL
The solution is a two part fix. The first leg involves setting up Google Webmaster Tools. After you verify your sites (both the www and non-www). Go to Site Configuration > Settings > Preferred Domain and set it to "Display URLs as www.example.com"
Part two of the solution is to set up a 301 redirect and you can do that by adding the code below to your .htaccess file:
# non-www to www
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule (.*) http://www.%{HTTP_HOST}/$1 [R=301,L]
To learn more, read up on more on 301 redirects.
After all this, it'll take a while for google webmaster tools to take effect. Apparently, it takes weeks for Google Webmaster Tools Blog to configure itself. You can learn more about the process at the tools.
------
NOTE: WORDPRESS USERS:
For WordPress Users, you will also need to change a setting in wordpress general settings and set your preferred URLs to have www.
Sunday, June 6, 2010
Online Favicon Maker
I needed to make a favicon today so I used this online site to generate it.
http://www.degraeve.com/favicon/
Helping the Browser Locate the favicon.ico file
http://www.thesitewizard.com/archive/favicon.shtml
Thursday, May 20, 2010
Subversion: Accidently SVN RM'd a file or folder?
If you accidently svn rm'd a file or folder. Don't stress out. As long as you didn't svn commit the change, you're fine. All you have to do is run:
For a file:
svn revert file_name
For a folder:
svn revert --recursive folder_name
You can also do this to a file or folder that you ran svn add on.
Ruby: Inserting Table Data into your messages
if var.updated_at
show.now[:alert] = "Your client, #{var.name} came at #{var.modified_time}."
end
Wednesday, May 19, 2010
Ruby: if elsif elsif else statements... ya... they do exist.
------------------------------------
# if, elsif and else illustrated
print "What distance in miles? "
miles = STDIN.gets.to_f
if miles < 2
puts "walk"
elsif miles < 6
puts "cycle"
elsif miles < 30
puts "bus or drive"
elsif miles < 350
puts "train"
else
puts "don't bother"
end
print "#{miles} miles is #{miles/5*8} kilometres\n"
Link for more info.