*Tested in Windows 8
Open/Goto
- ctrl+p: go to anything
- ctrl+t: go to file
- ctrl+ctrl+p: go to project
// Here's a neat jQuery trick to fade an element based on how far down | |
// the page you've scrolled (maybe you want an element to be fully visible | |
// when the user first encounters it, but become transparent as they move along): | |
$('h1').css({'opacity':( 100-$(window).scrollTop() )/100}); | |
// Where $('h1') is the element to be faded, and the first '100' | |
// can be adjusted to allow for distance down the page. |
// Remove unwanted HTML comments | |
$data = preg_replace('/<!--(.|\s)*?-->/', '', $data); |
// Original code from http://www.blog.highub.com/mobile-2/a-fix-for-iphone-viewport-scale-bug/ | |
var metas = document.getElementsByTagName('meta'); | |
var i; | |
if (navigator.userAgent.match(/iPhone/i)) { | |
for (i=0; i<metas.length; i++) { | |
if (metas[i].name == "viewport") { | |
metas[i].content = "width=device-width, minimum-scale=1.0, maximum-scale=1.0"; | |
} | |
} |
/** | |
* For modern browsers | |
* 1. The space content is one way to avoid an Opera bug when the | |
* contenteditable attribute is included anywhere else in the document. | |
* Otherwise it causes space to appear at the top and bottom of elements | |
* that are clearfixed. | |
* 2. The use of `table` rather than `block` is only necessary if using | |
* `:before` to contain the top-margins of child elements. | |
*/ | |
.cf:before, |
/* To target IE 6 and 7 */ | |
@media screen\9 { | |
body { background: red; } | |
} | |
/* To target IE 6, 7 and 8 */ | |
@media \0screen\,screen\9 { | |
body { background: green; } | |
} |
!function ($) { | |
$(function(){ | |
$('#home, #me, #footer').carousel({}); | |
var $root = $('html, body'); | |
$('a').click(function() { | |
var href = $.attr(this, 'href'); | |
$root.animate({ | |
scrollTop: $(href).offset().top |
<?php | |
//Example : http://localhost/index.php?option=com_hello&view=item&task=add_tag&tags=1400,1783,1770,9 | |
$data =JRequest::get( 'request' ); | |
print_r($data); | |
?> | |
//Output : | |
//Array ( [option] => com_hello [view] => item [task] => add_tags [tags] => 1400,1783,1770,9) |
<?php | |
function clean($string) { | |
$string = str_replace(" ", "-", $string); // Replaces all spaces with hyphens. | |
$string = preg_replace('/[^A-Za-z0-9\-]/', '', $string); // Removes special chars. | |
return preg_replace('/-+/', '_', $string); // Replaces multiple hyphens with single one. | |
} |
# Redirect www urls to non-www | |
RewriteCond %{HTTP_HOST} ^www\.yoursite\.com [NC] | |
RewriteRule (.*) http://yoursite.com/$1 [R=301,L] |