Friday, April 30, 2010

Display images as options in select box

styles
option.imagebacked {
padding: 0px 60px 65px; /* 60px and 65px are the images width and heigh values */
background-repeat: no-repeat;
/* background-position: 0px 60px 65px; */
vertical-align: middle;
}

<select name="issuetype" id="issuetype" style="height: 20px;">
<option value="1" class="imagebacked" style="background-image: url(http://ecx.images-amazon.com/images/I/51xW5d95RjL._SL75_.jpg);"> Bug </option>
<option value="2" class="imagebacked" style="background-image: url(http://ecx.images-amazon.com/images/I/51joflCZefL._SL75_.jpg);"> New Feature </option>
</select>

Reference
http://technology.amis.nl/blog/994/html-select-item-with-icons-in-addition-to-just-text-labels-applying-the-css-background-style-to-the-html-option-element

List of heroku commands

Hi,
Below are the list of available list of heroku commands

help # show this usage
version # show the gem version

list # list your apps
create [] # create a new app

keys # show your user's public keys
keys:add [] # add a public key
keys:remove # remove a key by name (user@host)
keys:clear # remove all keys

info # show app info, like web url and
open # open the app in a web browser
rename # rename the app

dynos # scale to qty web processes
workers # scale to qty background processe

sharing:add # add a collaborator
sharing:remove # remove a collaborator
sharing:transfer # transfers the app ownership

domains:add # add a custom domain name
domains:remove # remove a custom domain name
domains:clear # remove all custom domains

ssl:add # add SSL cert to the app
ssl:remove # removes SSL cert from the app do

rake # remotely execute a rake command
console # remotely execute a single consol
console # start an interactive console to

restart # restart app servers
logs # fetch recent log output for debu
logs:cron # fetch cron log output

maintenance:on # put the app into maintenance mod
maintenance:off # take the app out of maintenance

config # display the app's config vars (e
config:add key=val [...] # add one or more config vars
config:remove key [...] # remove one or more config vars
config:clear # clear user-set vars and reset to

stack # show current stack and list of a
stack:migrate # prepare migration of this app to

db:pull [] # pull the app's database into a l
db:push [] # push a local database into the a
ase
db:reset # reset the database for the app

bundles # list bundles for the app
bundles:capture [] # capture a bundle of the app's co
bundles:download # download most recent app bundle
bundles:download # download the named bundle
bundles:animate # animate a bundle into a new app
bundles:destroy # destroy the named bundle

addons # list installed addons
addons:info # list all available addons
addons:add name [key=value] # install addon (with zero or more
addons:remove name # uninstall an addons
addons:clear # uninstall all addons

destroy # destroy the app permanently

=== Plugins

plugins # list installed plugins
plugins:install # install the plugin from the spec
plugins:uninstall # remove the specified plugin

=== Example:

rails myapp
cd myapp
git init
git add .
git commit -m "my new app"
heroku create
git push heroku master