.black-semi-transparent {
background-color: transparent;
background-color: rgba(0, 0, 0, 0.5); /* FF3+, Saf3+, Opera 10.10+, Chrome, IE9 */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#7F000000,endColorstr=#7F000000); /* IE6–IE9 */
zoom: 1;
}
Thursday, 27 October 2011
Using CSS rgba() values for background-color in IE6+
You can use rgba values for background colors in IE6-9 with a simple Microsoft filter in your CSS. You can even find an amazing interactive tool to help you generate all this code here: www.css3please.com
Labels:
css,
internet-explorer
Sunday, 16 October 2011
Ubuntu 11.10 - Show Desktop Keyboard Shortcut
I couldn't find the keyboard shortcut / hotkey for minimising all windows. Turns out it was renamed to "Hide all normal windows". This can be found in Keyboard settings, under the Shortcuts tab.
Labels:
keyboard-shortcuts,
oneiric-ocelot,
ubuntu
Wednesday, 28 September 2011
Ubuntu 10.04 Lucid - notify-send in crontab not working
Alternative title: How to harness Ubuntu's black notification bubbles to set yourself repeating reminders
I recently found the wonderful command notify-send, which you can use to create those black Ubuntu notifications in the top right of the screen e.g. notify-send "Message Title" "This is my message." (you may need to install libnotify-bin). I then tried to shove this in my crontab to remind me to do stuff (e.g. take a short break every hour) but it didn't work.
Turns out that from the crontab, you have to tell it which DISPLAY to use, and luckily this turned out to be quite simply. All you need to do is add this prefix: DISPLAY=:0.0. So my crontab now looks like this:
I recently found the wonderful command notify-send, which you can use to create those black Ubuntu notifications in the top right of the screen e.g. notify-send "Message Title" "This is my message." (you may need to install libnotify-bin). I then tried to shove this in my crontab to remind me to do stuff (e.g. take a short break every hour) but it didn't work.
Turns out that from the crontab, you have to tell it which DISPLAY to use, and luckily this turned out to be quite simply. All you need to do is add this prefix: DISPLAY=:0.0. So my crontab now looks like this:
# m h dom mon dow command
0 * * * * DISPLAY=:0.0 notify-send "Have a break" "Have a Kit Kat"
Labels:
crontab,
lucid-lynx,
ubuntu
Thursday, 8 September 2011
Ubuntu 10.04 Lucid - Keyboard Shortcut to move window to other monitor (output)
I have a dual-monitor setup, and have always wanted to be able to move a window to another screen using a keyboard shortcut / hotkey. Turns out it is really easy:
CCSM (Compiz Comfig Settings Manager) > Put > Put to next output
I set it to <Ctrl><Alt>Enter
CCSM (Compiz Comfig Settings Manager) > Put > Put to next output
I set it to <Ctrl><Alt>Enter
Labels:
keyboard-shortcuts,
lucid-lynx,
ubuntu
Saturday, 3 September 2011
jQuery slideDown() doesn't work on elements with CSS min-height
jQuery v1.6.2
I have an empty div with min-height defined in the CSS. When I use jQuery's slideDown() on it, it doesn't work - the div just instantly appears. Here is the workaround:
First we grab the CSS min-height value. Then we overide it, setting it to 0, and animate our div to the given min-height. At this point, we have what we want, but our CSS is messed up (e.g. say our CSS min-height was originally 120px, now our div will have a fixed height of 120px). This means if we add more content to the div, it cannot grow like we want it to (the very reason we were using min-height in the first place). The solution is simply to reset jQuery's inline style values (see line 3), after which it seamlessly reverts to your original CSS values.
REFERENCES
http://docs.jquery.com/Tutorials:Getting_Around_The_Minimum_Height_Glitch
http://jsfiddle.net/jitter/mLHb9/1/
I have an empty div with min-height defined in the CSS. When I use jQuery's slideDown() on it, it doesn't work - the div just instantly appears. Here is the workaround:
var myMinHeight = myElement.css("minHeight");
myElement.css({minHeight: 0}).animate({height: myMinHeight}, "fast", function() {
$(this).css({minHeight: "", height: ""});
});
First we grab the CSS min-height value. Then we overide it, setting it to 0, and animate our div to the given min-height. At this point, we have what we want, but our CSS is messed up (e.g. say our CSS min-height was originally 120px, now our div will have a fixed height of 120px). This means if we add more content to the div, it cannot grow like we want it to (the very reason we were using min-height in the first place). The solution is simply to reset jQuery's inline style values (see line 3), after which it seamlessly reverts to your original CSS values.
REFERENCES
http://docs.jquery.com/Tutorials:Getting_Around_The_Minimum_Height_Glitch
http://jsfiddle.net/jitter/mLHb9/1/
Labels:
css,
javascript
Thursday, 18 August 2011
Google Chrome on Ubuntu 11.04 Natty - Your profile could not be opened correctly
For me this was due to ghost chrome processes still running. Close chrome, and type:
ps aux | grep chromeI had output like this:
16660 ? 00:00:15 chromeThen kill em all!!! e.g. to kill the first one (process id 16660), type:
16666 ? 00:00:00 chrome
16668 ? 00:00:00 chrome
18159 ? 00:00:11 chrome
18165 ? 00:00:00 chrome
18167 ? 00:00:00 chrome
kill 16660Then when you restart chrome, it should be able to load your profile properly again.
Labels:
google-chrome,
natty-narwhal,
ubuntu
Tuesday, 16 August 2011
Load event for Google Maps Javascript API V3
Use this JavaScript event listener to know when your Google Map finishes initialising.
REFERENCES
http://code.google.com/p/gmaps-api-issues/issues/detail?id=1516
google.maps.event.addListener(map, 'idle', function() {
...
});REFERENCES
http://code.google.com/p/gmaps-api-issues/issues/detail?id=1516
Labels:
google-maps-api,
javascript
Subscribe to:
Posts (Atom)