Skip to content

Instantly share code, notes, and snippets.

Ibrahim Muhammad whistler

Block or report user

Report or block whistler

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@whistler
whistler / center-div.css
Created Aug 12, 2011
Center a Fixed Width Div
View center-div.css
div#main {
width: 750px;
margin-left: auto;
margin-right: auto
}
@whistler
whistler / image-caption.css
Created Aug 12, 2011
Create Onhover Image Caption Using CSS
View image-caption.css
/* parent div and hover properties */
.imgteaser {
margin: 0;
overflow: hidden;
float: left;
position: relative;
}
.imgteaser a {
text-decoration: none;
float: left;
@whistler
whistler / monochrome-image.css
Created Aug 12, 2011
Monochrome image with CSS
View monochrome-image.css
a.a-thumb {
border: 1px solid black;
position: relative;
}
a.a-thumb img {
width: 60px;
height: 60px;
border: 0;
}
@whistler
whistler / mouseover-opacity.css
Created Aug 12, 2011
Opacize on mouseover CSS
View mouseover-opacity.css
.transparent
{zoom: 1;
filter: alpha(opacity=70);
opacity: 0.7;
}
.transparent:hover
{
opacity:1;
-moz-opacity:1;
@whistler
whistler / div-align-center.css
Created Aug 12, 2011
Align a div to the center of another div
View div-align-center.css
.inner {
width: 50%;
margin: auto;
}
@whistler
whistler / deploy.rb
Created Aug 13, 2011 — forked from skojin/deploy.rb
base capistrano configuration for passenger
View deploy.rb
set :application, "appname"
set :domain, "domain.tld"
role :web, domain # Your HTTP server, Apache/etc
role :app, domain # This may be the same as your `Web` server
role :db, domain, :primary => true # This is where Rails migrations will run
set :repository, "." # Deploy from the local repository
set :scm, "git"
set :branch, "master"
View jquery-hover-opacity.js
<script type="text/javascript">
jQuery(function(){
jQuery('#content div.portfolio,#content div.portfolio-small').hover(function(){
jQuery(this).find('img').fadeTo("fast", 0.5);
}, function(){
jQuery(this).find('img').fadeTo("fast", 1.0);
});
});
</script>
@whistler
whistler / install_vim+ruby
Created Sep 6, 2011
Install vim with ruby support in lion using macports
View install_vim+ruby
sudo port install mercurial
hg clone https://vim.googlecode.com/hg/ vim
./configure --prefix=/my/install/prefix --enable-rubyinterp --enable-gui=no --disable-gpm
make
sudo make install
## tested on lion
## more info: http://nerderati.com/2010/07/compiling-vim-with-ruby-integration-on-snow-leopard/
@whistler
whistler / download_file.rb
Created Sep 18, 2011
Download and Save File using Ruby
View download_file.rb
#smallest, cleanest code i have seen without curl
require 'open-uri'
open("http://someplace.com/somefile.mp3") do |in_io|
File.open("somefile.mp3", 'w') do |out_io|
out_io.print in_io.read
end
end
@whistler
whistler / thumbnail.css
Created Dec 1, 2011
grayscale img with css crossbrowser
View thumbnail.css
a.a-thumb {
border: 1px solid black;
position: relative;}
a.a-thumb img {
width: 60px;
height: 60px;
border: 0;}
a.a-thumb span {
background-color: #000000;
position: absolute;
You can’t perform that action at this time.